<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Embedd GUI</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta name="title" content="Embedd GUI"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2013-06-04 Tue"/>
<meta name="author" content="Nick Guthrie"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<style type="text/css">
 <!--/*--><![CDATA[/*><!--*/
  html { font-family: Times, serif; font-size: 12pt; }
  .title  { text-align: center; }
  .todo   { color: red; }
  .done   { color: green; }
  .tag    { background-color: #add8e6; font-weight:normal }
  .target { }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  .right  {margin-left:auto; margin-right:0px;  text-align:right;}
  .left   {margin-left:0px;  margin-right:auto; text-align:left;}
  .center {margin-left:auto; margin-right:auto; text-align:center;}
  p.verse { margin-left: 3% }
  pre {
	border: 1pt solid #AEBDCC;
	background-color: #F3F5F7;
	padding: 5pt;
	font-family: courier, monospace;
        font-size: 90%;
        overflow:auto;
  }
  table { border-collapse: collapse; }
  td, th { vertical-align: top;  }
  th.right  { text-align:center;  }
  th.left   { text-align:center;   }
  th.center { text-align:center; }
  td.right  { text-align:right;  }
  td.left   { text-align:left;   }
  td.center { text-align:center; }
  dt { font-weight: bold; }
  div.figure { padding: 0.5em; }
  div.figure p { text-align: center; }
  div.inlinetask {
    padding:10px;
    border:2px solid gray;
    margin:10px;
    background: #ffffcc;
  }
  textarea { overflow-x: auto; }
  .linenr { font-size:smaller }
  .code-highlighted {background-color:#ffff00;}
  .org-info-js_info-navigation { border-style:none; }
  #org-info-js_console-label { font-size:10px; font-weight:bold;
                               white-space:nowrap; }
  .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
                                 font-weight:bold; }
  /*]]>*/-->
</style>
<link rel="stylesheet" type="text/css" href="./nmg.css" />
<script type="text/javascript" src="http://orgmode.org/org-info.js">
/**
 *
 * @source: http://orgmode.org/org-info.js
 *
 * @licstart  The following is the entire license notice for the
 *  JavaScript code in http://orgmode.org/org-info.js.
 *
 * Copyright (C) 2012  Sebastian Rose
 *
 *
 * The JavaScript code in this tag is free software: you can
 * redistribute it and/or modify it under the terms of the GNU
 * General Public License (GNU GPL) as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option)
 * any later version.  The code is distributed WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.
 *
 * As additional permission under GNU GPL version 3 section 7, you
 * may distribute non-source (e.g., minimized or compacted) forms of
 * that code without the copy of the GNU GPL normally required by
 * section 4, provided you include this license notice and a URL
 * through which recipients can access the Corresponding Source.
 *
 * @licend  The above is the entire license notice
 * for the JavaScript code in http://orgmode.org/org-info.js.
 *
 */
</script>

<script type="text/javascript">

/*
@licstart  The following is the entire license notice for the
JavaScript code in this tag.

Copyright (C) 2012  Free Software Foundation, Inc.

The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version.  The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.


@licend  The above is the entire license notice
for the JavaScript code in this tag.
*/

<!--/*--><![CDATA[/*><!--*/
org_html_manager.set("TOC_DEPTH", "3");
org_html_manager.set("LINK_HOME", "http://code.google.com/p/embedd-gui/");
org_html_manager.set("LINK_UP", "");
org_html_manager.set("LOCAL_TOC", "1");
org_html_manager.set("VIEW_BUTTONS", "0");
org_html_manager.set("MOUSE_HINT", "underline");
org_html_manager.set("FIXED_TOC", "0");
org_html_manager.set("TOC", "0");
org_html_manager.set("VIEW", "overview");
org_html_manager.setup();  // activate after the parameters are set
/*]]>*///-->
</script>
<script type="text/javascript">
/*
@licstart  The following is the entire license notice for the
JavaScript code in this tag.

Copyright (C) 2012  Free Software Foundation, Inc.

The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version.  The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.


@licend  The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className   = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }
/*]]>*///-->
</script>

</head>
<body>
<div id="org-div-home-and-up" style="text-align:right;font-size:70%;white-space:nowrap;">
 <a accesskey="h" href="http://code.google.com/p/embedd-gui/"> UP </a>
 |
 <a accesskey="H" href="http://code.google.com/p/embedd-gui/"> HOME </a>
</div>

<div id="preamble">

</div>

<div id="content">
<h1 class="title">Embedd GUI</h1>

<p>Documentation: | <a href="./index.html">INFO.js</a> | <a href="./index.pdf">pdf</a> | <a href="./full.html">Single HTML</a> | <a href="http://nickguthrie.com/embedd_gui/doc/index.org">Org-Mode</a> | <br/>
Project Links:   | <a href="http://code.google.com/p/embedd-gui/">SVN Repository</a> | <a href="http://rcos.rpi.edu/projects/embedd-gui/">RCOS Observatory</a> | <a href="http://nickguthrie.com/embedd_gui/bin/Finalized/nickguthrie-a13-olinuxino-complete-v1.image.gz">Prebuilt Debian Images</a> | <a href="https://www.olimex.com/forum/index.php?topic=1595.0">Olimex Forum Post</a> | <br/>
This documentation is written under the <a href="#sec-8">GNU Free Documentation License</a>. <br/>
</p>

<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">Overview</a>
<ul>
<li><a href="#sec-1-1">A note from the Author</a></li>
<li><a href="#sec-1-2">License</a></li>
<li><a href="#sec-1-3">Primary Objective</a></li>
<li><a href="#sec-1-4">Background</a></li>
<li><a href="#sec-1-5">Why we need it</a></li>
<li><a href="#sec-1-6">How/Technologies - Qt Embedded</a></li>
</ul>
</li>
<li><a href="#sec-2">RCOS Presentations and Multimedia</a>
<ul>
<li><a href="#sec-2-1">RCOS Summer 2013 - Final Presentation</a></li>
<li><a href="#sec-2-2">Prototype Lightswitch GUI Videos</a></li>
<li><a href="#sec-2-3">A13 OlinuXino 4.3" Touchscreen Qt Embedded Demo</a></li>
<li><a href="#sec-2-4">RCOS Summer 2013 - Meeting 7 - Open Source Spectrometer + Embedded GUI</a></li>
<li><a href="#sec-2-5">A13-OLinuXino-MICRO Qt Embedded Fluidlauncher Video</a></li>
<li><a href="#sec-2-6">RCOS Summer 2013 - Initial Presentation</a></li>
</ul>
</li>
<li><a href="#sec-3">Hardware</a>
<ul>
<li><a href="#sec-3-1">Actual</a>
<ul>
<li><a href="#sec-3-1-1">A13-OlinuXino</a></li>
<li><a href="#sec-3-1-2">USB Wireless LAN Module</a></li>
<li><a href="#sec-3-1-3">4.3-inch LCD for A13 OLinuXino, 480x272, with Touch Screen</a></li>
<li><a href="#sec-3-1-4">JY-MCU Bluetooth Board V1.02</a></li>
</ul>
</li>
<li><a href="#sec-3-2">Testing</a>
<ul>
<li><a href="#sec-3-2-1">A13-OLinuXino-MICRO (No Touchscreen Support)</a></li>
<li><a href="#sec-3-2-2">4.3" LCD Screen</a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-4">Getting Started</a>
<ul>
<li><a href="#sec-4-1">Overview</a></li>
<li><a href="#sec-4-2">Copy the prebuilt Debian Image to the Device</a></li>
<li><a href="#sec-4-3">Getting the Development Environment Set Up</a></li>
<li><a href="#sec-4-4">Compiling Programs</a></li>
<li><a href="#sec-4-5">Sending Programs over to the Device</a></li>
<li><a href="#sec-4-6">Running a Program</a></li>
<li><a href="#sec-4-7">Calibrating the Toucscreen</a></li>
<li><a href="#sec-4-8">Contributing to the Documentation</a></li>
</ul>
</li>
<li><a href="#sec-5">Quick Reference</a>
<ul>
<li><a href="#sec-5-1">Connect to Serial via Bluetooth</a></li>
<li><a href="#sec-5-2">Communicate via SSH</a></li>
<li><a href="#sec-5-3">Connect with SFTP for File Transfer</a></li>
<li><a href="#sec-5-4">Send Files via SCP</a>
<ul>
<li><a href="#sec-5-4-1">Overview</a></li>
<li><a href="#sec-5-4-2">Examples</a></li>
<li><a href="#sec-5-4-3">Links</a></li>
</ul>
</li>
<li><a href="#sec-5-5">Check Remaining Space on Hard Drive</a></li>
<li><a href="#sec-5-6">Sync Files with rsync</a>
<ul>
<li><a href="#sec-5-6-1">Sync a Directory From Host To Device</a></li>
<li><a href="#sec-5-6-2">Links</a></li>
</ul>
</li>
<li><a href="#sec-5-7">Building Projects with Qmake</a></li>
<li><a href="#sec-5-8">Backups</a>
<ul>
<li><a href="#sec-5-8-1">Backup the SD Card</a></li>
<li><a href="#sec-5-8-2">Restore the SD Card</a></li>
<li><a href="#sec-5-8-3">Backup Data to Web Storage</a></li>
<li><a href="#sec-5-8-4">Links</a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-6">HOWTO</a>
<ul>
<li><a href="#sec-6-1">Obtain Hardware</a></li>
<li><a href="#sec-6-2">Copy Debian Image to SD Card</a>
<ul>
<li><a href="#sec-6-2-1">Overview</a></li>
<li><a href="#sec-6-2-2">Steps</a></li>
<li><a href="#sec-6-2-3">Links</a></li>
</ul>
</li>
<li><a href="#sec-6-3">Configure Touchscreen (script.bin)</a>
<ul>
<li><a href="#sec-6-3-1">Overview</a></li>
<li><a href="#sec-6-3-2">Steps</a></li>
<li><a href="#sec-6-3-3">Links</a></li>
</ul>
</li>
<li><a href="#sec-6-4">Modifying the script.bin file (Optional)</a>
<ul>
<li><a href="#sec-6-4-1">Overview</a></li>
<li><a href="#sec-6-4-2">Installation</a></li>
<li><a href="#sec-6-4-3">General Usage</a></li>
<li><a href="#sec-6-4-4">Errors</a></li>
<li><a href="#sec-6-4-5">Links</a></li>
</ul>
</li>
<li><a href="#sec-6-5">Configure Debian</a>
<ul>
<li><a href="#sec-6-5-1">Configure Wireless (Dynamic IP Address)</a></li>
<li><a href="#sec-6-5-2">Configure Static IP Address</a></li>
<li><a href="#sec-6-5-3">Set Date</a></li>
<li><a href="#sec-6-5-4">Set Keyboard Locale</a></li>
<li><a href="#sec-6-5-5">Install Programs</a></li>
<li><a href="#sec-6-5-6">Configure SSH to start on Boot</a></li>
<li><a href="#sec-6-5-7">Install XFCE (Optional)</a></li>
</ul>
</li>
<li><a href="#sec-6-6">Configure Serial Communication with Bluetooth Module</a>
<ul>
<li><a href="#sec-6-6-1">Communicate to Bluetooth</a></li>
<li><a href="#sec-6-6-2">Get Serial Over Linux</a></li>
</ul>
</li>
<li><a href="#sec-6-7">Install ARM Toolchain with Buildroot</a>
<ul>
<li><a href="#sec-6-7-1">Steps</a></li>
<li><a href="#sec-6-7-2">Links</a></li>
</ul>
</li>
<li><a href="#sec-6-8">Configure tslib on Device</a>
<ul>
<li><a href="#sec-6-8-1">Overview</a></li>
<li><a href="#sec-6-8-2">Steps</a></li>
<li><a href="#sec-6-8-3">Errors</a></li>
<li><a href="#sec-6-8-4">Test tslib Input Received from Touchscreen</a></li>
<li><a href="#sec-6-8-5">Links</a></li>
</ul>
</li>
<li><a href="#sec-6-9">Configure QT for Embedded Linux</a>
<ul>
<li><a href="#sec-6-9-1">Steps</a></li>
<li><a href="#sec-6-9-2">Links</a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-7">Simple Sample Programs</a>
<ul>
<li><a href="#sec-7-1">Vital Vio Controller</a>
<ul>
<li><a href="#sec-7-1-1">Main.cpp</a></li>
<li><a href="#sec-7-1-2">MainWindow.cpp</a></li>
<li><a href="#sec-7-1-3">MainWindow.h</a></li>
<li><a href="#sec-7-1-4">moc_mainwindow.cpp</a></li>
<li><a href="#sec-7-1-5">ui_mainwindow.h</a></li>
<li><a href="#sec-7-1-6">mainwindow.ui</a></li>
</ul>
</li>
<li><a href="#sec-7-2">Burgler</a>
<ul>
<li><a href="#sec-7-2-1">Source</a></li>
<li><a href="#sec-7-2-2">Notes</a></li>
</ul>
</li>
<li><a href="#sec-7-3">Basic Output to LCD Screen</a>
<ul>
<li><a href="#sec-7-3-1">MainWindow.cpp</a></li>
<li><a href="#sec-7-3-2">MainWindow.h</a></li>
<li><a href="#sec-7-3-3">moc_mainwindow.cpp</a></li>
<li><a href="#sec-7-3-4">ui_mainwindow.h</a></li>
<li><a href="#sec-7-3-5">mainwindow.ui</a></li>
</ul>
</li>
<li><a href="#sec-7-4">Hello World Program</a>
<ul>
<li><a href="#sec-7-4-1">Source Code</a></li>
</ul>
</li>
<li><a href="#sec-7-5">Toggle A LED (A13-Olimex-Micro)</a>
<ul>
<li><a href="#sec-7-5-1">Using the Commandline</a></li>
<li><a href="#sec-7-5-2">Using C Code</a></li>
<li><a href="#sec-7-5-3">Links</a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-8">GNU Free Documentation License</a></li>
</ul>
</div>
</div>

<div id="outline-container-1" class="outline-2">
<h2 id="sec-1">Overview</h2>
<div class="outline-text-2" id="text-1">


</div>

<div id="outline-container-1-1" class="outline-3">
<h3 id="sec-1-1">A note from the Author</h3>
<div class="outline-text-3" id="text-1-1">

<p>This documentation is written under the <a href="#sec-8">GNU Free Documentation License</a>. The SVN repository with the source code for this project can be found <a href="http://code.google.com/p/embedd-gui/">here</a>. This documentation is viewable as an <a href="./index.html">html info file</a>, a <a href="./full.html">single html file</a>, a <a href="./index.pdf">pdf</a>, and in its original <a href="http://nickguthrie.com/embedd_gui/doc/index.org">org-mode</a> format. This project would not be possible without funding from the <a href="http://rcos.rpi.edu/">Rensselaer Center for Open Source</a>.  The RCOS Observatory Project page can be found <a href="http://rcos.rpi.edu/projects/embedd-gui/">here</a>. <br/>
<br/>
I would like to extend a special thanks to:
</p><ul>
<li><a href="http://rcos.rpi.edu/donor/">Sean O' Sullivan</a>
</li>
<li><a href="http://www.cs.rpi.edu/~goldsd/index.php">Professor Goldschmidt, Ph.D</a>
</li>
<li><a href="http://www.cs.rpi.edu/~moorthy/">Professor Krishnamoorthy, Ph.D</a>
</li>
<li>Timothy Cantwell
</li>
<li>Jorel Lalicki
</li>
<li>RCOS Members for their continued support
</li>
</ul>

<p><br/>
Happy Hacking! :) <br/>
</p>
<p>
Nick Guthrie <br/>
</p>
</div>

</div>

<div id="outline-container-1-2" class="outline-3">
<h3 id="sec-1-2">License</h3>
<div class="outline-text-3" id="text-1-2">




<pre class="example">Copyright (c)  2013  Nicholas Guthrie.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
</pre>


</div>

</div>

<div id="outline-container-1-3" class="outline-3">
<h3 id="sec-1-3">Primary Objective</h3>
<div class="outline-text-3" id="text-1-3">

<ul>
<li>The goal of this project is to give users the ability to install Qt Embedded on an open source hardware system to allow for cheap, fast prototyping of graphical user interfaces.
</li>
</ul>

</div>

</div>

<div id="outline-container-1-4" class="outline-3">
<h3 id="sec-1-4">Background</h3>
<div class="outline-text-3" id="text-1-4">

<p>We live in a world surrounded by computers - from our (arguably excessive) coffee  machines to our cell phones and cars, microcomputers play an integral role in our everyday lives. With the cost of electronics rapidly decreasing, and touchscreens becoming commonplace even on low cost consumer products, a unique need has arisen for a unified way of creating user interfaces on embedded devices.
</p></div>

</div>

<div id="outline-container-1-5" class="outline-3">
<h3 id="sec-1-5">Why we need it</h3>
<div class="outline-text-3" id="text-1-5">

<p>It is easy for small companies and hobbyists to prototype microcontroller based products, such as environmental sensors and other equipment. However, user interface design is generally left at basic pushbuttons and potentiometers, with at most a simple text display on a serial LCD. The barrier to entry into high end touchscreen interfaces is high: it often involves more development/work than the device itself, and there exist few unified solutions for multi-processor and display targeted builds. The few solutions that do exist are prohibitively expensive: For example, a license of Segger EmWin costs $12,300&hellip; per target architecture/CPU! Embedd GUI aims to be a “drop in” interface for embedded developers to rapidly incorporate touchscreens into projects.
</p></div>

</div>

<div id="outline-container-1-6" class="outline-3">
<h3 id="sec-1-6">How/Technologies - Qt Embedded</h3>
<div class="outline-text-3" id="text-1-6">

<p><img src="./img/qt-embedded-linux-architecture.png"  alt="./img/qt-embedded-linux-architecture.png" />
</p><ul>
<li>"Qt for Embedded Linux is a C++ framework for GUI and application development for embedded devices."
</li>
<li>"Qt for Embedded Linux applications write directly to the framebuffer, eliminating the need for the X Window System and saving memory."
</li>
<li>Qt Embedded allows us to run graphical interfaces without the heavy weight of running an entire graphical desktop.
</li>
<li>Features
<ul>
<li>Pointer Handling
</li>
<li>Character Input
</li>
<li>Display Management
</li>
<li>Hardware Accelerated Graphics
</li>
<li>Fonts
</li>
</ul>

</li>
<li>Links
<ul>
<li><a href="http://qt-project.org/doc/qt-4.8/qt-embedded-linux.html">http://qt-project.org/doc/qt-4.8/qt-embedded-linux.html</a>
</li>
</ul>

</li>
</ul>

</div>
</div>

</div>

<div id="outline-container-2" class="outline-2">
<h2 id="sec-2">RCOS Presentations and Multimedia</h2>
<div class="outline-text-2" id="text-2">


</div>

<div id="outline-container-2-1" class="outline-3">
<h3 id="sec-2-1">RCOS Summer 2013 - Final Presentation</h3>
<div class="outline-text-3" id="text-2-1">

<ul>
<li><a href="http://youtu.be/g0xSY7x0GME">Video</a>
</li>
<li><a href="./doc/OSSEG3.pdf">Presentation Slides</a>
</li>
</ul>

</div>

</div>

<div id="outline-container-2-2" class="outline-3">
<h3 id="sec-2-2">Prototype Lightswitch GUI Videos</h3>
<div class="outline-text-3" id="text-2-2">

<ul>
<li><a href="http://youtu.be/XWMzWnA78z0">Vital Vio Controller</a>
</li>
<li><a href="http://youtu.be/5cpHjrTNl-s">RPI RCOS Embedd-GUI Controller</a>
</li>
</ul>

</div>

</div>

<div id="outline-container-2-3" class="outline-3">
<h3 id="sec-2-3">A13 OlinuXino 4.3" Touchscreen Qt Embedded Demo</h3>
<div class="outline-text-3" id="text-2-3">

<ul>
<li><a href="http://youtu.be/v-ndT9fh3e0">Video</a>
  Here is a demonstration of Qt Embedded touchscreen running the raycasting demo and the styledemo.
</li>
</ul>

</div>

</div>

<div id="outline-container-2-4" class="outline-3">
<h3 id="sec-2-4">RCOS Summer 2013 - Meeting 7 - Open Source Spectrometer + Embedded GUI</h3>
<div class="outline-text-3" id="text-2-4">

<ul>
<li><a href="http://youtu.be/aGBMwWWGzmk">Video</a>
</li>
<li><a href="./doc/OSSEG2.pdf">Presentation Slides</a>
</li>
</ul>

</div>

</div>

<div id="outline-container-2-5" class="outline-3">
<h3 id="sec-2-5">A13-OLinuXino-MICRO Qt Embedded Fluidlauncher Video</h3>
<div class="outline-text-3" id="text-2-5">

<ul>
<li><a href="http://youtu.be/rqEB2OLgkCY">Video</a>
</li>
</ul>

</div>

</div>

<div id="outline-container-2-6" class="outline-3">
<h3 id="sec-2-6">RCOS Summer 2013 - Initial Presentation</h3>
<div class="outline-text-3" id="text-2-6">

<ul>
<li><a href="./doc/OSSEG1.pdf">Presentation Slides</a>
</li>
</ul>

</div>
</div>

</div>

<div id="outline-container-3" class="outline-2">
<h2 id="sec-3">Hardware</h2>
<div class="outline-text-2" id="text-3">


</div>

<div id="outline-container-3-1" class="outline-3">
<h3 id="sec-3-1">Actual</h3>
<div class="outline-text-3" id="text-3-1">


</div>

<div id="outline-container-3-1-1" class="outline-4">
<h4 id="sec-3-1-1">A13-OlinuXino</h4>
<div class="outline-text-4" id="text-3-1-1">

<p><img src="./img/A13-OLinuXino-01.png"  alt="./img/A13-OLinuXino-01.png" />
</p><ul>
<li id="sec-3-1-1-1">Overview<br/>
A13-OLinuXino is a low-cost single-board Linux computer in a very compact nano-ITX form. It uses the very first Cortex A8 processor available in eLQFP176 package, produced by Allwinner Technology Inc A13.

</li>
</ul>
<ul>
<li id="sec-3-1-1-2">Features<br/>
<ul>
<li>A13 Cortex A8 processor at 1GHz, 3D Mali400 GPU
</li>
<li>512 MB RAM (2 x 256Mbit x 8)
</li>
<li>6-16VDC input power supply, noise immune design
</li>
<li>3 + 1 USB hosts, 3 available for users, 1 leads to onboard pinout
</li>
<li>1 USB OTG which can power the board
</li>
<li>SD-card connector for booting optional Linux image
</li>
<li>VGA video output
</li>
<li>Battery option and connector
</li>
<li>LCD signals available on connector so you still can use LCD if you diasble VGA/HDMI
</li>
<li>Microphone input
</li>
<li>4 Mount holes
</li>
<li>RTC PCF8536 on board for real time clock and alarms
</li>
<li>5 Keys on board for android navigation
</li>
<li>UEXT connectorfor connecting addtional UEXT modules like Zigbee, Bluetooth, Relays, etc
</li>
<li>GPIO connector with 68/74 pins and these signals:
</li>
<li>17 for adding NAND flash;
</li>
<li>22 for connecting LCDs;
</li>
<li>20+4 including 8 GPIOs which can be input, output, interrupt sources;
</li>
<li>3x I2C;
</li>
<li>2x UARTs;
</li>
<li>SDIO2 for connectinf SDcards and modules;
</li>
<li>5 system pins: +5V, +3.3V, GND, RESET, NMI
</li>
<li>Dimensions: 120 x 120 mm (4.7x4.7'')
</li>
<li>Optional low-cost 7" LCD with touchscreen
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-1-3">Links<br/>
<ul>
<li id="sec-3-1-1-3-1">Retailers<br/>
<ul>
<li><a href="https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino/">Olimex</a>
</li>
<li><a href="http://microcontrollershop.com/product_info.php?products_id=5412">microcontrollershop.com</a>
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-1-3-2">Datasheets<br/>
<ul>
<li><a href="https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino/resources/A13-OLINUXINO.pdf">User Manual</a>
</li>
<li><a href="https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino/resources/A13-Brief.pdf">A13-processor brief and datasheet</a>
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-1-3-3">Hardware<br/>
<ul>
<li><a href="https://github.com/OLIMEX/OLINUXINO">GitHub OLINUXINO Project</a>
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-1-3-4">Software<br/>
<ul>
<li><a href="https://github.com/OLIMEX/OLINUXINO">GitHub OLINUXINO Project</a>
</li>
<li><a href="http://linux-sunxi.org/">A1x Linux</a>
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-1-3-5">Community<br/>
<ul>
<li><a href="https://www.olimex.com/forum">OLinuXino forum</a> for discussion and community support
</li>
<li><a href="http://webchat.freenode.net/?channels=olimex">Freenode #olimex irc channel</a> for OLinuXino development discussions
</li>
</ul>


</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-3-1-1-4">Extracted CPU Info<br/>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Processor</th><th scope="col" class="left">ARMv7 Processor rev 2 (v7l)</th></tr>
<tr><th scope="col" class="left">BogoMIPS</th><th scope="col" class="left">1001.88</th></tr>
<tr><th scope="col" class="left">Features</th><th scope="col" class="left">swp half thumb fastmult vfp edsp neon vfpv3</th></tr>
<tr><th scope="col" class="left">CPU implementer</th><th scope="col" class="left">0x41</th></tr>
<tr><th scope="col" class="left">CPU architecture</th><th scope="col" class="left">7</th></tr>
<tr><th scope="col" class="left">CPU variant</th><th scope="col" class="left">0x3</th></tr>
<tr><th scope="col" class="left">CPU part</th><th scope="col" class="left">0xc08</th></tr>
<tr><th scope="col" class="left">CPU revision</th><th scope="col" class="left">2</th></tr>
</thead>
<tbody>
<tr><td class="left">Hardware</td><td class="left">sun5i</td></tr>
<tr><td class="left">Revision</td><td class="left">0000</td></tr>
<tr><td class="left">Serial</td><td class="left">0000000000000000</td></tr>
</tbody>
</table>

<ul>
<li>Derived From:



<pre class="src src-sh">cat /proc/cpuinfo
</pre>

</li>
</ul>


</li>
</ul>
</div>

</div>

<div id="outline-container-3-1-2" class="outline-4">
<h4 id="sec-3-1-2">USB Wireless LAN Module</h4>
<div class="outline-text-4" id="text-3-1-2">

<p><img src="./img/modwifirtl8188.png"  alt="./img/modwifirtl8188.png" />
</p><ul>
<li id="sec-3-1-2-1">Overview<br/>
<ul>
<li>The MOD-WIFI-RTL8188 is a USB WiFi module that is supported by the <a href="http://microcontrollershop.com/product_info.php?products_id=5412&amp;osCsid=e1d38e51b568a17c2fe8bc8c2679dcda">A13-OLinuXino</a> and <a href="http://microcontrollershop.com/product_info.php?products_id=5414&amp;osCsid=e1d38e51b568a17c2fe8bc8c2679dcda">A13-OLinuXino-MICRO</a> boards.
</li>
<li>It uses the same WiFi board that comes as standard on the <a href="http://microcontrollershop.com/product_info.php?products_id=5314&amp;osCsid=e1d38e51b568a17c2fe8bc8c2679dcda">A13-OLinuXino-WIFI</a>.
</li>
<li>The WM-294 WiFi board on this module contains the popular RealTek RTL8188CUS single-chip Wireless LAN adapter. There are drivers available for Windows, Linux/Android and Mac, so you aren't limited only to using this module on an A13-OLinuXino board.
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-2-2">Features<br/>
<ul>
<li>Has WM-294 module with RTL8188CUS, IEEE 802.11b/g/n
</li>
<li>Operates in 2.4 GHz frequency bands
</li>
<li>1x1 MIMO technology improves effective throughput and range over existing 802.11 b/g products
</li>
<li>Data rates up to 150Mbps
</li>
<li>802.11e-compatible bursting and i standards
</li>
<li>BPSK, QPSK, 16 QAM, 64 QAM modulation schemes
</li>
<li>WEP, TKIP, AES, WPA, and WPA2 hardware encryption schemes
</li>
<li>Standard USB type A connector
</li>
<li>On-board antenna
</li>
<li>5V/3.3V operation modes via SMD jumper (5V by default)
</li>
<li>4 test pads for easy tracking of the supply, d-, d+, and GND
</li>
<li>PCB: FR-4, 1.00 mm (0.039"), solder mask, silkscreen component print
</li>
<li>Dimensions: 65.15 × 20.38 mm (2.56 × 0.80")
</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-3-1-2-3">Links<br/>
<ul>
<li id="sec-3-1-2-3-1">Retailers<br/>
<ul>
<li><a href="http://microcontrollershop.com/product_info.php?products_id=5555">MicroControllerShop.com</a>
</li>
<li><a href="https://www.olimex.com/Products/Modules/Ethernet/MOD-WIFI-RTL8188/">Olimex</a>
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-2-3-2">Datasheets<br/>
<ul>
<li><a href="./doc/module_WM294_spec.pdf">CC&amp;C Technologies WM-294 Datasheet</a>
</li>
<li><a href="#MOD-WiFi_RTL8188.pdf">MOD-WIFI-RTL8188 Schematic</a>
</li>
</ul>

</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-3-1-3" class="outline-4">
<h4 id="sec-3-1-3">4.3-inch LCD for A13 OLinuXino, 480x272, with Touch Screen</h4>
<div class="outline-text-4" id="text-3-1-3">

<p><img src="./img/a13lcd43ts_front.png"  alt="./img/a13lcd43ts_front.png" />     <img src="./img/a13lcd43ts_back.png"  alt="./img/a13lcd43ts_back.png" />
</p><ul>
<li id="sec-3-1-3-1">Overview<br/>
<ul>
<li>This is a 4.3-inch LCD with a resistive touch screen and an interface board that has been tested to work with A13 OLinuXino boards.
</li>
<li>It connects to your A13 OLinuXino board by a 2×20-pin connector.
</li>
<li>The display board and the OLinuXino board both have male box headers, so you will need a 40-pin IDC ribbon cable which is sold separately.
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-3-2">Features<br/>
<ul>
<li id="sec-3-1-3-2-1">TFT Panel<br/>
<ul>
<li>Bo Lymin BT043DCNNHHp$ 4.3-inch (480×272) a-Si color TFT-LCD with white LED / CCFL backlight
</li>
<li>262K colors
</li>
<li>Anti-glare surface
</li>
<li>Resistive touchscreen panel
</li>
<li>40-pin connector for connection to A13-OLinuXino boards
</li>
<li>3.3V single power input with built-in power supply circuit
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-3-2-2">LCD Controller<br/>
<ul>
<li>MCU interface: 8/9/16/18-bit 80/68 series MCU interface
</li>
<li>Display RAM size: 640×240×3×6 bits, e.g. 320×240 two-frame buffer with 262K colors
</li>
<li>Arbitrary display memory start position selection
</li>
<li>8-bit / 16-bit interface: supports 65K (R5G6B5) / 262K (R6G6B6) color data format
</li>
<li>9-bit / 18-bit interface: supports 262K (R6G6B6) color data format
</li>
</ul>

</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-3-1-3-3">Interface Board View<br/>
<ul>
<li>Note: The A13-OLinuXino boards come with an Android image set up for using a VGA display.
</li>
<li>To use this LCD, you'll need to upload a new image with the appropriate settings.
</li>
<li>A ready-made image (as well as the default VGA image so you can switch back) is available on the A13 OLinuXino Wiki Page (they are intended for 7-inch displays, so be sure also to get the <a href="https://docs.google.com/file/d/0B-bAEPML8fwlcHFOcUxtQ1N5RDQ/edit">A13-LCD43 script</a>, which adjusts the resolution for this display size).
</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-3-1-3-4">Links<br/>
<ul>
<li id="sec-3-1-3-4-1">Retailers<br/>
<ul>
<li><a href="http://microcontrollershop.com/product_info.php?products_id=5557">microcontrollershop.com</a>
</li>
<li><a href="https://www.olimex.com/Products/OLinuXino/A13/A13-LCD43TS/">Olimex</a>
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-3-4-2">Datasheets<br/>
<ul>
<li><a href="http://microcontrollershop.com/download/BT043DCN.pdf?osCsid=2fe0acf3ed565f2850d0f350a0b3647d">Download Datasheet</a>
</li>
<li><a href="http://microcontrollershop.com/download/A13-LCD4_3.pdf?osCsid=2fe0acf3ed565f2850d0f350a0b3647d">Download Schematic</a>
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-3-4-3">Demonstrations<br/>
<ul>
<li><a href="http://microcontrollershop.com/redirect.php?action=url&amp;goto=http://www.youtube.com/watch?v=d2lFHBMhQ64&amp;osCsid=2fe0acf3ed565f2850d0f350a0b3647d">Video of the Multitouch Feature</a>
</li>
</ul>


</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-3-1-4" class="outline-4">
<h4 id="sec-3-1-4">JY-MCU Bluetooth Board V1.02</h4>
<div class="outline-text-4" id="text-3-1-4">

<p><img src="./img/jy-mcu_bt_board_v102.jpg"  alt="./img/jy-mcu_bt_board_v102.jpg" />
</p><ul>
<li id="sec-3-1-4-1">Specifications<br/>
<img src="./img/jy-mcu_bt_board_v102_specs.jpg"  alt="./img/jy-mcu_bt_board_v102_specs.jpg" />
<ul>
<li>This shield have extract the VCC、GND、TXD、RXD of the bluetooth.
<ul>
<li>(TXD、RXD are both 3.3V)
</li>
</ul>

</li>
<li>This shield has LED indication light.
</li>
<li>Input Voltage ： 3.3V-6V
</li>
<li>Size : 15.5mm*39.8mm
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-1-4-2">Features<br/>
<ul>
<li>This module power supply input is 3.6 ~ 6V, please be careful that it should be not more than 7V.
</li>
<li>compatible with master mode、slave mode and both master-slave mode
</li>
<li>This module include key interface and state interface compared with Smart Bluetooth Module Baseboard.
</li>
<li>The key interface on the baseboard is the master mode button and can be controlled by high level from external MCU, then this module will search again automatically.
</li>
<li>The STATE interface on the baseboard is interface for LED STATE output feet, when bluetooth module don't not connected with other device and then output pulse, when bluetooth module connected with other device and then output high level, and the MCU will judge the state, then this module will search again automatically.
</li>
</ul>

</li>
</ul>
</div>
</div>

</div>

<div id="outline-container-3-2" class="outline-3">
<h3 id="sec-3-2">Testing</h3>
<div class="outline-text-3" id="text-3-2">


</div>

<div id="outline-container-3-2-1" class="outline-4">
<h4 id="sec-3-2-1">A13-OLinuXino-MICRO (No Touchscreen Support)</h4>
<div class="outline-text-4" id="text-3-2-1">

<p><img src="./img/A13-OLinuXino-MICRO-2.png"  alt="./img/A13-OLinuXino-MICRO-2.png" />
</p><ul>
<li id="sec-3-2-1-1">Features<br/>
<ul>
<li>A13 Cortex A8 processor at 1GHz, 3D Mali400 GPU
</li>
<li>256 MB RAM (128Mbit x 16)
</li>
<li>5VDC input power supply with own ICs, noise immune design
</li>
<li>1 USB host
</li>
<li>1 USB OTG which can power the board
</li>
<li>SD-card connector for booting the Linux image
</li>
<li>VGA video output
</li>
<li>LCD signals available on connector so you still can use LCD if you diasble VGA/HDMI
</li>
<li>Audio output
</li>
<li>Microphone input pads (no connector)
</li>
<li>1 User key
</li>
<li>4 Mount holes
</li>
<li>UEXT connectorfor connecting addtional UEXT modules like Zigbee, Bluetooth, Relays, etc
</li>
<li>GPIO connector with 68/74 pins and these signals:
<ul>
<li>17 for adding NAND flash;
</li>
<li>22 for connecting LCDs;
</li>
<li>20+4 including 8 GPIOs which can be input, output, interrupt sources;
</li>
<li>3x I2C;
</li>
<li>2x UARTs;
</li>
<li>SDIO2 for connectinf SDcards and modules;
</li>
<li>5 system pins: +5V, +3.3V, GND, RESET, NMI
</li>
</ul>

</li>
<li>Dimensions: 100 x 85 mm (3.950x3.350'')
</li>
<li>Optional low-cost 7" LCD with touchscreen
</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-3-2-1-2">FAQ<br/>
<ul>
<li id="sec-3-2-1-2-1">There is only 1 USB host on the board, how can I connect simultaneously my USB mouse and USB keyboard?<br/>
<ul>
<li>You should use external USB hub.
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-2-1-2-2">What software is available for the board?<br/>
<ul>
<li>The software development changes very rapidly. So far we have reports for number of Linux distributions working properly with the MICRO, please visit the WIKI and the GitHub     pages of A13-OLinuXino-MICRO to find suitable distributions;additionally you might want to check on the forum for additional help
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-2-1-2-3">I bought A13-LCD7-TS but when I connect it to the A13-OLinuXino-MICRO I receive no image on the display. What do I do wrong?<br/>
<ul>
<li>The default A13-OLinuXino-MICRO image is set for a VGA display and resolution. To use LCD with A13-OLinuXino-MICRO you need to upload new image with the appropriate settings.
</li>
<li>The download links for the images may be found in the wiki article for A13-OLinuXino.
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-2-1-2-4">What is the operating temperature range of A13-OLinuXino?<br/>
<ul>
<li>The board works in the commercial temeprature range 0+70C
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-2-1-2-5">Where can I find the Android image for the A13-OLinuXino-MICRO?<br/>
<ul>
<li>At the moment we haven't tested Android booting from SD card. Android from SD card is currently not officially supported. However note that there are people reporting success getting it to run - head to the Olimex forums for more recent info.
</li>
</ul>

</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-3-2-1-3">Documentation<br/>
<ul>
<li><a href="./doc/A13-OLINUXINO-MICRO.pdf">A13-OLinuXino-MICRO User Manual</a>
</li>
<li><a href="./doc/A13-Brief.pdf">ManyCore Lite SoC for Android 4.0 PAD</a>
</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-3-2-1-4">Links<br/>
<ul>
<li id="sec-3-2-1-4-1">General<br/>
<ul>
<li><a href="https://github.com/OLIMEX/OLINUXINO">https://github.com/OLIMEX/OLINUXINO</a>
</li>
<li><a href="https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-MICRO/">https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-MICRO/</a>
</li>
<li><a href="http://linux-sunxi.org/Main_Page">http://linux-sunxi.org/Main_Page</a> - for discussion and community support
</li>
<li><a href="https://www.olimex.com/forum/">https://www.olimex.com/forum/</a> - for OLinuXino development discussions
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-2-1-4-2">Software Sources<br/>
<ul>
<li><a href="https://www.olimex.com/wiki/A13-OLinuXino-MICRO">https://www.olimex.com/wiki/A13-OLinuXino-MICRO</a>
<ul>
<li><a href="https://docs.google.com/file/d/0B-bAEPML8fwlTWFweEZGM0hmMkE/edit">https://docs.google.com/file/d/0B-bAEPML8fwlTWFweEZGM0hmMkE/edit</a>
</li>
</ul>

</li>
<li><a href="https://www.olimex.com/wiki/A13-OLinuXino">https://www.olimex.com/wiki/A13-OLinuXino</a>
</li>
</ul>

</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-3-2-1-5">Extrated CPU Info<br/>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
</thead>
<tbody>
<tr><td class="left">Processor</td><td class="left">ARMv7 Processor rev 2 (v7l)</td></tr>
<tr><td class="left">BogoMIPS</td><td class="left">1001.88</td></tr>
<tr><td class="left">Features</td><td class="left">swp half thumb fastmult vfp edsp neon vfpv3</td></tr>
<tr><td class="left">CPU implementer</td><td class="left">0x41</td></tr>
<tr><td class="left">CPU architecture</td><td class="left">7</td></tr>
<tr><td class="left">CPU variant</td><td class="left">0x3</td></tr>
<tr><td class="left">CPU part</td><td class="left">0xc08</td></tr>
<tr><td class="left">CPU revision</td><td class="left">2</td></tr>
</tbody>
<tbody>
<tr><td class="left">Hardware</td><td class="left">sun5i</td></tr>
<tr><td class="left">Revision</td><td class="left">0000</td></tr>
<tr><td class="left">Serial</td><td class="left">0000000000000000</td></tr>
</tbody>
</table>

<ul>
<li>Derived From:



<pre class="src src-sh">cat /proc/cpuinfo
</pre>

</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-2-1-6">Research on Touchscreen Support<br/>
<ul>
<li id="sec-3-2-1-6-1">Problem Overview<br/>
<ul>
<li>Problem with the A13 Micro: All debian images are built for 512 MB of RAM, 256 is all that is available
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-2-1-6-2">Research<br/>
<ul>
<li id="sec-3-2-1-6-2-1">Xman Conversation <a href="https://www.olimex.com/forum/index.php?topic=617.10;wap2">{Link}</a><br/>
<ul>
<li>&lt;xman&gt; hi, What happens if my dram_size = 512 in [dram_para], but my board have only 256MB?
</li>
<li>&lt;WarheadsSE&gt; xman: which board ?
</li>
<li>&lt;xman&gt; <a href="https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-MICRO/">https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-MICRO/</a>
</li>
<li>techn_&gt; with 256MB ram you propably need to disable mali, framebuffer and g2d.. memmap hard coded to somewhere 400-500MB
</li>
<li>&lt;techn_&gt; <a href="https://github.com/linux-sunxi/linux-sunxi/blob/sunxi-3.0/arch/arm/mach-sun5i/core.c#L222example">example</a>
</li>
<li>xman&gt; 64M and 32M is for what?
</li>
<li>techn_&gt; 64M mali, 32M for reserved framebuffer(for mali use)
</li>
<li>&hellip;
</li>
<li>&lt;WarheadsSE&gt; xman: then you should be enable appropriately adjust the dram para, but you might need an updated uboot that has a 256M SPL
</li>
<li>..
</li>
<li>&lt;WarheadsSE&gt; the Wifi has an AXP, which the Mirco doesn't.
</li>
<li>&lt;WarheadsSE&gt; That's a big difference.
</li>
<li>&hellip;
</li>
<li>&lt;xman&gt; so, you edit fex, uptade kernel and update u-boot?
</li>
<li>&lt;WarheadsSE&gt; yes, fex change, kernel source change, u-boot source change
</li>
<li>&lt;WarheadsSE&gt; recompile all.
</li>
<li>..
</li>
<li>&lt;WarheadsSE&gt; For the moment, they need to use the provided kernel source repository, and the associated uboot.
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-3-2-1-6-2-2">Olimex General Conversation <a href="https://www.olimex.com/forum/index.php?topic=707.msg2819;topicseen#msg2819">{Link}</a><br/>
</li>
</ul>
<ul>
<li id="sec-3-2-1-6-2-3">In Depth Conversation about Recompiling Kernal from Source <a href="https://www.olimex.com/forum/index.php?topic=617.0">{Link}</a><br/>
</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-3-2-1-6-3">Compile Kernal From Source<br/>
<ul>
<li id="sec-3-2-1-6-3-1">Links<br/>
<ul>
<li><a href="https://www.olimex.com/forum/index.php?topic=747.msg3558#msg3558">https://www.olimex.com/forum/index.php?topic=747.msg3558#msg3558</a>



<pre class="src src-sh">git clone git://github.com/linux-sunxi/u-boot-sunxi.git
git clone https://github.com/hehopmajieh/linux-sunxi
<span style="color: #b0c4de;">cd</span> linux-sunxi
git checkout origin/sunxi-3.0
make a13_olinuxino_micro <span style="color: #7fffd4;">CROSS_COMPILE</span>=arm-linux-gnueabi-
make <span style="color: #7fffd4;">ARCH</span>=arm a13om_defconfig
make <span style="color: #7fffd4;">ARCH</span>=arm menuconfig
</pre>

</li>
</ul>

</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-3-2-2" class="outline-4">
<h4 id="sec-3-2-2">4.3" LCD Screen</h4>
<div class="outline-text-4" id="text-3-2-2">

<ul>
<li>FPC4034006
</li>
<li>tl-c430ve display
</li>
<li>4.3" FPC4304006 MP4 MP5 GPS lcd display panel
</li>
<li>Place of Origin: Guangdong, China (Mainland)
</li>
<li>Brand Name: BYD
</li>
</ul>


</div>
</div>
</div>

</div>

<div id="outline-container-4" class="outline-2">
<h2 id="sec-4">Getting Started</h2>
<div class="outline-text-2" id="text-4">


</div>

<div id="outline-container-4-1" class="outline-3">
<h3 id="sec-4-1">Overview</h3>
<div class="outline-text-3" id="text-4-1">

<p>This contains complete documentation of all steps taken including solutions to errors I encountered.  If you are installing the system from scratch, its probably better to start at the base of the HOWTO.  If you want to use a prebuilt image and start writing GUIS:
</p></div>

</div>

<div id="outline-container-4-2" class="outline-3">
<h3 id="sec-4-2">Copy the prebuilt Debian Image to the Device</h3>
<div class="outline-text-3" id="text-4-2">

<ol>
<li>Download A13-OlinuXino Debian Image (<a href="http://nickguthrie.com/embedd_gui/bin/Finalized/nickguthrie-a13-olinuxino-complete-v1.image.gz">here</a>).
</li>
<li>Mount SD Card on Computer
</li>
<li>Copy Image onto SD card



<pre class="src src-sh">sudo gzip -dc /path/to/nickguthrie-a13-olinuxino-complete-v1.image.gz | dd <span style="color: #7fffd4;">of</span>=/dev/mmcblk0
</pre>

<ul>
<li>WARNING: will overwrite everything on card
</li>
<li>obviously replacing "<i>path/to</i>" with the location of the image on your computer
</li>
<li>"/dev/mmcblk0" should be where you mounted the SD card on your computer
</li>
</ul>

</li>
</ol>


</div>

</div>

<div id="outline-container-4-3" class="outline-3">
<h3 id="sec-4-3">Getting the Development Environment Set Up</h3>
<div class="outline-text-3" id="text-4-3">

<ol>
<li>Set up the <a href="#sec-6-7">Cross Compiling Toolchain</a>
</li>
<li>Compile <a href="#sec-6-9">TSLIB from Source on Development Platform</a>
</li>
<li><a href="#sec-6-9">Compile QT from Source</a>
</li>
<li>Install QT Creator



<pre class="src src-sh">sudo apt-get install qtcreator
</pre>

</li>
</ol>


</div>

</div>

<div id="outline-container-4-4" class="outline-3">
<h3 id="sec-4-4">Compiling Programs</h3>
<div class="outline-text-3" id="text-4-4">

<ol>
<li>You must first build the makefile using the Qmake compiled in the last step, mine exists in /usr/local/qt/bin/qmake.  If I had a program created in qt_creator called my_program:



<pre class="src src-sh">/usr/local/qt/bin/qmake my_program.pro
</pre>

<ul>
<li>only needs to be done once on the system
</li>
</ul>

</li>
<li>Afterwards, compile the program with:



<pre class="src src-sh">make clean; make
</pre>

<ul>
<li>If all your path variables are set correctly this will then create a program in the ARM Architechture, which can then be run on the device.
</li>
<li>If you aren't using anything specific to the device (I used some code with the virtual screen, so I can't run on the desktop), you can build it on the host machine just for testing purposes with the regular qmake.



<pre class="src src-sh">qmake my_program.pro;
make clean; make
</pre>

<ul>
<li>of course to run it on the device, you would need to run it with the correct qmake, before building
</li>
</ul>

</li>
<li>Emacs has great support for debugging with Make files (M-x compile) then enter the build commands (make clean; make)
</li>
</ul>

</li>
</ol>

</div>

</div>

<div id="outline-container-4-5" class="outline-3">
<h3 id="sec-4-5">Sending Programs over to the Device</h3>
<div class="outline-text-3" id="text-4-5">

<p>After building the program, it must be sent to the device in order to run
</p><ol>
<li>Set up SFTP
<ol>
<li>Connect to the device



<pre class="src src-sh">sftp root@192.168.12.222
</pre>

<ul>
<li>This is the static IP, so it should work, otherwise check the device IP
</li>
</ul>

</li>
<li>Set the local directory (where the binary is to send)



<pre class="src src-sh">lcd /home/slaye/Desktop/myprogram/
</pre>

</li>
<li>Set the directory where you want to send the program



<pre class="src src-sh"><span style="color: #b0c4de;">cd</span> ./Desktop
</pre>

</li>
</ol>

</li>
<li>Send the program to the Device



<pre class="src src-sh">put myprogram
</pre>

</li>
</ol>

</div>

</div>

<div id="outline-container-4-6" class="outline-3">
<h3 id="sec-4-6">Running a Program</h3>
<div class="outline-text-3" id="text-4-6">

<ol>
<li>Plug in the Wireless, and USB Keyboard before booting
<ul>
<li>WARNING: not plugging in the keyboard may mess up the settings that tell TSLIB where to look for touchscreen input.  Currently a keyboard is always needed, which is why it is configured this way, this can be modified in the <a href="#sec-6-8">TSLIB configuration</a> on the device for more permanent results.
</li>
</ul>

</li>
<li>Plug in Power
</li>
<li>Login:
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<tbody>
<tr><td class="left">Username</td><td class="left">root</td></tr>
<tr><td class="left">Password</td><td class="left">password</td></tr>
</tbody>
</table>

</li>
<li>Navigate to the Directory



<pre class="src src-sh"><span style="color: #b0c4de;">cd</span> ./Desktop/; <span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">go to Desktop</span>
<span style="color: #b0c4de;">cd</span> ..;         <span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">go to the previous directory</span>
ls;            <span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">show the files in the current directory</span>
</pre>

</li>
<li>Once you are in the dirtory with your program (say, my_program), run it with:



<pre class="src src-sh">./my_program -qws
</pre>

<ul>
<li>the "-qws" is the command to run the virtual screen
</li>
</ul>

</li>
<li>Killing the Program
   since these programs are meant to run "permanently" there is no way to exit from within the program, you can kill the process from another shell to end the program.
<ol>
<li>Type Ctrl + Alt + F2 to switch to the second terminal
</li>
<li>Login (Username: root, Password, password)
</li>
<li>Find your process name (aka the CMD)



<pre class="src src-sh">ps -a
</pre>

</li>
<li>Kill the Process



<pre class="src src-sh">killall my_program
</pre>

</li>
<li>Check the process is dead



<pre class="src src-sh">ps -a
</pre>

<ul>
<li>the program should be gone
</li>
<li>you can kill it with more power with:



<pre class="src src-sh"><span style="color: #b0c4de;">kill</span> -9 my_program
</pre>

<p>
        OR
</p>


<pre class="src src-sh"><span style="color: #b0c4de;">kill</span> -9 PID
</pre>

<ul>
<li>where you use the PID found with "ps -a"
</li>
</ul>

</li>
</ul>

</li>
<li>Switch back to your other terminal with Ctrl + Alt + F1
</li>
</ol>

</li>
</ol>

</div>

</div>

<div id="outline-container-4-7" class="outline-3">
<h3 id="sec-4-7">Calibrating the Toucscreen</h3>
<div class="outline-text-3" id="text-4-7">

<ul>
<li>You can calibrate the toucschreen with:



<pre class="src src-sh">ts_calibrate
</pre>

</li>
<li>There are also a few other ts program, such as:



<pre class="src src-sh">ts_calibrate;
ts_harvest;
ts_print;
ts_print_raw;
ts_test;
</pre>

</li>
</ul>

</div>

</div>

<div id="outline-container-4-8" class="outline-3">
<h3 id="sec-4-8">Contributing to the Documentation</h3>
<div class="outline-text-3" id="text-4-8">

<ul>
<li>This documentation is generated with org-mode in Emacs.
</li>
<li>Org-Mode is included by default in Emacs.
</li>
<li>You must add the project to a list, then you compile
</li>
<li>Add this to your ~/.emacs file.



<pre class="src src-elisp"><span style="color: #fa8072;">;; </span><span style="color: #ff7f24; font-style: italic;">-------------------------------------</span>
<span style="color: #fa8072;">;; </span><span style="color: #ff7f24; font-style: italic;">-- Publish Websites</span>
<span style="color: #fa8072;">;; </span><span style="color: #ff7f24; font-style: italic;">-------------------------------------</span>
(setq org-publish-project-alist
      '((<span style="color: #ffc1c1;">"embedd-gui"</span>
         <span style="color: #b0c4de;">:base-directory</span> <span style="color: #ffc1c1;">"~/svn/embedd-gui/doc/"</span>
         <span style="color: #b0c4de;">:publishing-directory</span> <span style="color: #ffc1c1;">"~/svn/embedd-gui/doc/"</span>
         )))
</pre>

<ul>
<li>obviously changing the based directory where the /doc dir is and the publish to wherever you want to output the results.
</li>
</ul>

</li>
<li>To publish, in Emacs open the embedd-gui/docs/notes.org file, and type: C-u C-c C-e E.
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<tbody>
<tr><td class="left">C-u</td><td class="left">forces all to be published, since it won't recoginize some files have changed due to the way they are linked</td></tr>
<tr><td class="left">C-c C-e</td><td class="left">is the same thing as M-x org-export</td></tr>
<tr><td class="left">E</td><td class="left">the option to export all projects</td></tr>
</tbody>
</table>

<ul>
<li>you should then find the freshly exported documentation in your publish directory
<ul>
<li>This will publish in all of the useful export formats, including a javascript file, 2 html files, and pdf. (All linked to at the top).
</li>
</ul>

</li>
<li>The style sheet is a custom css I wrote (nmg.css), which must be included at the root of the directory for it to look pretty.
</li>
</ul>

</li>
</ul>


</div>
</div>

</div>

<div id="outline-container-5" class="outline-2">
<h2 id="sec-5">Quick Reference</h2>
<div class="outline-text-2" id="text-5">


</div>

<div id="outline-container-5-1" class="outline-3">
<h3 id="sec-5-1">Connect to Serial via Bluetooth</h3>
<div class="outline-text-3" id="text-5-1">

<p>Prerequisite: configure <a href="#Serial-Communicate-with-Board-with-Bluetooth-Module-Add-On">rfcomm.conf</a>
</p><ol>
<li>Initialize Connection



<pre class="src src-sh">sudo rfcomm connect rfcomm2
</pre>

</li>
<li>Connect with Screen



<pre class="src src-sh">sudo screen /dev/rfcomm2 115200
</pre>

</li>
<li>Login
</li>
</ol>

</div>

</div>

<div id="outline-container-5-2" class="outline-3">
<h3 id="sec-5-2">Communicate via SSH</h3>
<div class="outline-text-3" id="text-5-2">




<pre class="src src-sh">ssh root@192.168.12.200 -p 22122
</pre>

</div>

</div>

<div id="outline-container-5-3" class="outline-3">
<h3 id="sec-5-3">Connect with SFTP for File Transfer</h3>
<div class="outline-text-3" id="text-5-3">




<pre class="src src-sh">sftp -P 22122 root@192.168.12.200
</pre>

<ul>
<li>Change Local Directory



<pre class="src src-sh">lcd /local/directory
</pre>

</li>
<li>Get File



<pre class="src src-sh">get &lt;file&gt;
</pre>

</li>
<li>Send File



<pre class="src src-sh">put &lt;file&gt;
</pre>

</li>
</ul>


</div>

</div>

<div id="outline-container-5-4" class="outline-3">
<h3 id="sec-5-4">Send Files via SCP</h3>
<div class="outline-text-3" id="text-5-4">


</div>

<div id="outline-container-5-4-1" class="outline-4">
<h4 id="sec-5-4-1">Overview</h4>
<div class="outline-text-4" id="text-5-4-1">

<p>scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.
</p></div>

</div>

<div id="outline-container-5-4-2" class="outline-4">
<h4 id="sec-5-4-2">Examples</h4>
<div class="outline-text-4" id="text-5-4-2">

<ul>
<li id="sec-5-4-2-1">Copy the file "foobar.txt" from a remote host to the local host<br/>



<pre class="src src-sh">scp -P 22122 root@192.168.12.200:foobar.txt /some/local/directory
</pre>

</li>
</ul>
<ul>
<li id="sec-5-4-2-2">Copy the file "foobar.txt" from the local host to a remote host<br/>



<pre class="src src-sh">scp -P 22122 foobar.txt root@192.168.12.200:/some/remote/directory
</pre>

</li>
</ul>
<ul>
<li id="sec-5-4-2-3">Copy the directory "foo" from the local host to a remote host's directory "bar"<br/>



<pre class="src src-sh">scp -P 22122 -r foo root@192.168.12.200:/some/remote/directory/bar
</pre>

</li>
</ul>
<ul>
<li id="sec-5-4-2-4">Copy the file "foobar.txt" from remote host "rh1.edu" to remote host "rh2.edu"<br/>



<pre class="src src-sh">scp -P 22122 your_username@rh1.edu:/some/remote/directory/foobar.txt your_username@rh2.edu:/some/remote/directory/
</pre>

</li>
</ul>
<ul>
<li id="sec-5-4-2-5">Copying the files "foo.txt" and "bar.txt" from the local host to your home directory on the remote host<br/>



<pre class="src src-sh">scp -P 22122 foo.txt bar.txt root@192.168.12.200:~
</pre>

</li>
</ul>
<ul>
<li id="sec-5-4-2-6">Copy the file "foobar.txt" from the local host to a remote host using port 2264<br/>



<pre class="src src-sh">scp -P 22122 -P 2264 foobar.txt root@192.168.12.200:/some/remote/directory
</pre>

</li>
</ul>
<ul>
<li id="sec-5-4-2-7">Copy multiple files from the remote host to your current directory on the local host<br/>



<pre class="src src-sh">scp -P 22122 root@192.168.12.200:/some/remote/directory/<span style="color: #ffc1c1;">\{</span>a,b,c<span style="color: #ffc1c1;">\}</span> <span style="color: #b0c4de;">.</span>
scp -P 22122 root@192.168.12.200:~/<span style="color: #ffc1c1;">\{</span>foo.txt,bar.txt<span style="color: #ffc1c1;">\}</span> <span style="color: #b0c4de;">.</span>
</pre>


</li>
</ul>
<ul>
<li id="sec-5-4-2-8">Receive and Entire Directory<br/>



<pre class="src src-sh">scp -r root@192.168.12.222:/root/Desktop/src/tslib tslib_v2
</pre>

</li>
</ul>
</div>

</div>

<div id="outline-container-5-4-3" class="outline-4">
<h4 id="sec-5-4-3">Links</h4>
<div class="outline-text-4" id="text-5-4-3">

<ul>
<li><a href="http://www.hypexr.org/linux_scp_help.php">http://www.hypexr.org/linux_scp_help.php</a>
</li>
</ul>

</div>
</div>

</div>

<div id="outline-container-5-5" class="outline-3">
<h3 id="sec-5-5">Check Remaining Space on Hard Drive</h3>
<div class="outline-text-3" id="text-5-5">




<pre class="src src-sh">du -h &lt;path_of_the_dir&gt; | tail -1
</pre>

</div>

</div>

<div id="outline-container-5-6" class="outline-3">
<h3 id="sec-5-6">Sync Files with rsync</h3>
<div class="outline-text-3" id="text-5-6">


</div>

<div id="outline-container-5-6-1" class="outline-4">
<h4 id="sec-5-6-1">Sync a Directory From Host To Device</h4>
<div class="outline-text-4" id="text-5-6-1">

<p>/ will not modify host directory /
</p>


<pre class="src src-sh">rsync -rtvz -e <span style="color: #ffc1c1;">"ssh -p 22122"</span> /home/slayer/Desktop/foo/ root@192.168.12.200:/root/Desktop/foo/
</pre>

</div>

</div>

<div id="outline-container-5-6-2" class="outline-4">
<h4 id="sec-5-6-2">Links</h4>
<div class="outline-text-4" id="text-5-6-2">

<ul>
<li><a href="http://mike-hostetler.com/blog/2007/12/08/rsync-non-standard-ssh-port/">http://mike-hostetler.com/blog/2007/12/08/rsync-non-standard-ssh-port/</a>
</li>
<li><a href="http://www.jveweb.net/en/archives/2010/11/synchronizing-folders-with-rsync.html">http://www.jveweb.net/en/archives/2010/11/synchronizing-folders-with-rsync.html</a>
</li>
</ul>

</div>
</div>

</div>

<div id="outline-container-5-7" class="outline-3">
<h3 id="sec-5-7">Building Projects with Qmake</h3>
<div class="outline-text-3" id="text-5-7">

<ol>
<li>Build Project



<pre class="src src-sh">/usr/local/bin/qmake project.pro
make clean
make
</pre>

</li>
<li>Send binary files over to device (either with rsync, scp, or sftp)
</li>
<li>Run program
</li>
</ol>

</div>

</div>

<div id="outline-container-5-8" class="outline-3">
<h3 id="sec-5-8">Backups</h3>
<div class="outline-text-3" id="text-5-8">


</div>

<div id="outline-container-5-8-1" class="outline-4">
<h4 id="sec-5-8-1">Backup the SD Card</h4>
<div class="outline-text-4" id="text-5-8-1">

<ol>
<li>Navigate to backup directoryhttp://raspberrypi.stackexchange.com/questions/311/how-do-i-backup-my-raspberry-pi



<pre class="src src-sh"><span style="color: #b0c4de;">cd</span> BAK/
</pre>

</li>
<li>connect card to linux, unmounted
</li>
<li>copy card contents with dd



<pre class="src src-sh">sudo dd <span style="color: #7fffd4;">if</span>=/dev/mmcblk0 | gzip &gt; ./debian_configured_v1.image.gz
</pre>

</li>
</ol>

</div>

</div>

<div id="outline-container-5-8-2" class="outline-4">
<h4 id="sec-5-8-2">Restore the SD Card</h4>
<div class="outline-text-4" id="text-5-8-2">

<ol>
<li>insert unmounted card
</li>
<li>unzip to card



<pre class="src src-sh">sudo gzip -dc /path/to/debian_configured_v1.image.gz | dd <span style="color: #7fffd4;">of</span>=/dev/mmcblk0
</pre>

</li>
</ol>

</div>

</div>

<div id="outline-container-5-8-3" class="outline-4">
<h4 id="sec-5-8-3">Backup Data to Web Storage</h4>
<div class="outline-text-4" id="text-5-8-3">




<pre class="src src-sh">rsync -rtvz --progress /media/Global/Global/BAK/embedd_gui/bin nickguthrie.com:nickguthrie.com/embedd_gui/bin
</pre>

</div>

</div>

<div id="outline-container-5-8-4" class="outline-4">
<h4 id="sec-5-8-4">Links</h4>
<div class="outline-text-4" id="text-5-8-4">

<ul>
<li id="sec-5-8-4-1">How do I make a Backup of my Rasberry Pi <a href="http://raspberrypi.stackexchange.com/questions/311/how-do-i-backup-my-raspberry-pi">{Link}</a><br/>
<ol>
<li>Make a full backup of the image
<ul>
<li>If you are running linux then you can use the dd command to make a full backup of the image:



<pre class="src src-sh">dd <span style="color: #7fffd4;">if</span>=/dev/sdx <span style="color: #7fffd4;">of</span>=/path/to/image
</pre>

</li>
<li>or for compression:



<pre class="src src-sh">dd <span style="color: #7fffd4;">if</span>=/dev/sdx | gzip &gt; /path/to/image.gz
</pre>

</li>
<li>Where sdx is your SD card.
</li>
</ul>

</li>
<li>To restore the backup you reverse the commands:
<ul>
<li>Uncompressed



<pre class="src src-sh">dd <span style="color: #7fffd4;">if</span>=/path/to/image <span style="color: #7fffd4;">of</span>=/dev/sdx
</pre>

</li>
<li>or when compressed:



<pre class="src src-sh">gzip -dc /path/to/image.gz | dd <span style="color: #7fffd4;">of</span>=/dev/sdx
</pre>

</li>
</ul>

</li>
</ol>

</li>
</ul>
</div>
</div>
</div>

</div>

<div id="outline-container-6" class="outline-2">
<h2 id="sec-6">HOWTO</h2>
<div class="outline-text-2" id="text-6">


</div>

<div id="outline-container-6-1" class="outline-3">
<h3 id="sec-6-1">Obtain Hardware</h3>
<div class="outline-text-3" id="text-6-1">

<p>The hardware used in this guide:
</p><ul>
<li><a href="#sec-3-1-1">A13-OlinuXino</a>
</li>
<li><a href="#sec-3-1-2">USB Wireless LAN Module</a>
</li>
</ul>

</div>

</div>

<div id="outline-container-6-2" class="outline-3">
<h3 id="sec-6-2">Copy Debian Image to SD Card</h3>
<div class="outline-text-3" id="text-6-2">


</div>

<div id="outline-container-6-2-1" class="outline-4">
<h4 id="sec-6-2-1">Overview</h4>
<div class="outline-text-4" id="text-6-2-1">

<ul>
<li>I am installing a Debian Image found <a href="https://www.olimex.com/wiki/Prebuilt_SD_card_images_running_debian">here</a>.
<ul>
<li>Specifically:
    <a href="https://docs.google.com/file/d/0B-bAEPML8fwlLTU4UlZaMFdpODQ/edit?usp=sharing">A13 Debian 2GB card image without XFCE4 with GCC, GPIO, WIFI, WTHERNET, UVC, Python, OpenCV</a>
</li>
</ul>

</li>
</ul>

</div>

</div>

<div id="outline-container-6-2-2" class="outline-4">
<h4 id="sec-6-2-2">Steps</h4>
<div class="outline-text-4" id="text-6-2-2">

<ol>
<li>Download Debian Image
</li>
<li>Unrar Debian Image



<pre class="src src-sh">unrar e A13_debian_WIFI_GCC_GPIO_IN_OUT_AUTO_load_withoutX_I2C_100KHz_UVC_Python_OpenCV_fifth_release.rar
</pre>

</li>
<li>Copy img file to card



<pre class="src src-sh">dd <span style="color: #7fffd4;">bs</span>=4M <span style="color: #7fffd4;">oflag</span>=sync <span style="color: #7fffd4;">if</span>=A13_Micro_Debian_1GHz_GPIO_100kHz_I2C_WIFI_USB_LAN_without_X_and_touch_first_release.img <span style="color: #7fffd4;">of</span>=/dev/mmcblk0
</pre>

<ul>
<li>WARNING: will overwrite everything on card
</li>
</ul>

</li>
</ol>

</div>

</div>

<div id="outline-container-6-2-3" class="outline-4">
<h4 id="sec-6-2-3">Links</h4>
<div class="outline-text-4" id="text-6-2-3">

<ul>
<li><a href="http://www.cnx-software.com/2012/12/21/olimex-a13-olinuxino-micro-development-board-unboxing-and-review/">http://www.cnx-software.com/2012/12/21/olimex-a13-olinuxino-micro-development-board-unboxing-and-review/</a>
</li>
<li><a href="https://www.olimex.com/wiki/Prebuilt_SD_card_images_running_debian">https://www.olimex.com/wiki/Prebuilt_SD_card_images_running_debian</a>
</li>
</ul>

</div>
</div>

</div>

<div id="outline-container-6-3" class="outline-3">
<h3 id="sec-6-3">Configure Touchscreen (script.bin)</h3>
<div class="outline-text-3" id="text-6-3">


</div>

<div id="outline-container-6-3-1" class="outline-4">
<h4 id="sec-6-3-1">Overview</h4>
<div class="outline-text-4" id="text-6-3-1">

<ul>
<li>The script.bin will determine what display can be used.
</li>
<li>There are different configurations for different displays when you use Linux because the dot pitch is different.
</li>
</ul>

</div>

</div>

<div id="outline-container-6-3-2" class="outline-4">
<h4 id="sec-6-3-2">Steps</h4>
<div class="outline-text-4" id="text-6-3-2">

<ol>
<li>Create LCD script directory



<pre class="src src-sh">mkdir scripts;
<span style="color: #b0c4de;">cd</span> scripts;
</pre>

</li>
<li>Download <a href="https://www.olimex.com/wiki/Configuration_of_hardware_in_the_debian_image">VGA_LCD_scripts_A13.zip</a>
</li>
<li>Extract the folders



<pre class="example">unzip VGA_LCD_scripts_A13.zip
</pre>

</li>
<li>Mount 17 MB Fat32 Partition to Computer
</li>
<li>Backup script.bin on device



<pre class="src src-sh"><span style="color: #b0c4de;">cd</span> /media/mmcblk0
cp script.bin script.bin.BAK
</pre>

</li>
<li>Copy correct script.bin to Device



<pre class="src src-sh">cp scripts/script_GPIO_LCD_480x272/script.bin /media/mmcblk0
</pre>

</li>
</ol>


</div>

</div>

<div id="outline-container-6-3-3" class="outline-4">
<h4 id="sec-6-3-3">Links</h4>
<div class="outline-text-4" id="text-6-3-3">

<ul>
<li><a href="https://www.olimex.com/wiki/Configuration_of_hardware_in_the_debian_image">Olimex.com Wiki: Configuration of hardware in the Debian Image</a>
</li>
</ul>

</div>
</div>

</div>

<div id="outline-container-6-4" class="outline-3">
<h3 id="sec-6-4">Modifying the script.bin file (Optional)</h3>
<div class="outline-text-3" id="text-6-4">


</div>

<div id="outline-container-6-4-1" class="outline-4">
<h4 id="sec-6-4-1">Overview</h4>
<div class="outline-text-4" id="text-6-4-1">

<ul>
<li>The bin2fex and fex2bin program supplied by Olimex can be used to convert the script.bin binary file to a readable/editable text file, which can then be modified and converted back into a script.bin binary file.
</li>
</ul>

</div>

</div>

<div id="outline-container-6-4-2" class="outline-4">
<h4 id="sec-6-4-2">Installation</h4>
<div class="outline-text-4" id="text-6-4-2">

<ol>
<li>extract A13 tar file



<pre class="src src-sh"><span style="color: #b0c4de;">cd</span> bin/
tar -zxvf fex2bin_bin_fex_tools.tar.gz
</pre>

</li>
<li>install libusb



<pre class="src src-sh">sudo apt-get install libusb-1.0-0-dev
</pre>

</li>
<li>Build Files



<pre class="src src-sh">make clean
make -k
</pre>

</li>
</ol>

</div>

</div>

<div id="outline-container-6-4-3" class="outline-4">
<h4 id="sec-6-4-3">General Usage</h4>
<div class="outline-text-4" id="text-6-4-3">

<ul>
<li id="sec-6-4-3-1">Using bin2fex<br/>
<ul>
<li>First, get hold of the script.bin file located in the boot loader partition (do this by mounting either the RFSFAT16_BOOTLOADER_00000 from Livesuit, or the actual partition image from the tablet). Place it on the Desktop of your Ubuntu machine. Then, from a terminal on the Desktop, run:



<pre class="src src-sh"><span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">./bin2fex script.bin script.fex</span>
../bin/A13_script_files/fex2bin_bin_fex_tools/bin2fex script.bin script.fex
</pre>

<ul>
<li>This converts the script.bin file into script.fex. Here's the output produced - script.fex.
</li>
</ul>

</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-4-3-2">Using fex2bin<br/>
<ul>
<li>To convert back, it's simply the reverse:



<pre class="src src-sh"><span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">./fex2bin script.fex script.bin</span>
../bin/A13_script_files/fex2bin_bin_fex_tools/fex2bin script.fex script.bin
</pre>

<ul>
<li>This can then be placed back on the bootloader partition (remember to also overwrite script0.bin).
</li>
</ul>

</li>
</ul>

</li>
</ul>
</div>

</div>

<div id="outline-container-6-4-4" class="outline-4">
<h4 id="sec-6-4-4">Errors</h4>
<div class="outline-text-4" id="text-6-4-4">

<ul>
<li id="sec-6-4-4-1">INIT: cannot execute "/sbin/getty"<br/>
<ul>
<li id="sec-6-4-4-1-1">Description<br/>
<ul>
<li>During boot, serial connaction outputs error:



<pre class="example">INIT: cannot execute "/sbin/getty"
</pre>

</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-4-4-1-2">Probable Cause<br/>
<ul>
<li>The util-linux is not installed
</li>
</ul>


</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-6-4-5" class="outline-4">
<h4 id="sec-6-4-5">Links</h4>
<div class="outline-text-4" id="text-6-4-5">

<ul>
<li id="sec-6-4-5-1">Configuration of hardware in the debian image <a href="https://www.olimex.com/wiki/Configuration_of_hardware_in_the_debian_image">{Link}</a><br/>
<ul>
<li id="sec-6-4-5-1-1">Tools<br/>
<ul>
<li id="sec-6-4-5-1-1-1">Script file<br/>
<ul>
<li>The script.bin is a text file with very important configuration parameters like port GPIO assignments, DDR memory parameters, Video resolution etc, by changing these parameters in the script.bin you can configure your Linux without need to re-compile your kernel again and again this is smart way Allwinner provides for tweaking A13 Linux Kernel
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-4-5-1-1-2">fex<br/>
<ul>
<li>The fex tool will convert a script.bin file to a text file and back again.
</li>
<li>This allows the easy modification of the settings that are in the script.bin file
</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-4-5-1-1-3">Tools and script files<br/>
<ul>
<li>A13 script bin and fex tool
</li>
<li>The directory A13_script_files contains:
<dl>
<dt>script.bin</dt><dd>the default script with VGA800x600settings
</dd>
<dt>fex2bin_bin_fex_tools.tar.gz</dt><dd>tools fex2bin and bin2fex for converting the *.bin script file to *.fex(text file)
</dd>
<dt>script_GPIO_VGA</dt><dd>script with VGA800x600settings
</dd>
<dt>script_GPIO_LCD_800x480</dt><dd>script with LCD800x480settings
</dd>
</dl>

</li>
</ul>


</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-6-4-5-1-2">Changing A13-OLinuxino settings to VGA800x600 or LCD800x480<br/>
<ul>
<li>The default SD card setup is made with settings for VGA 800x600. If you want to switch between VGA 800x600 and LCD800x480 mode then you have to replace the existing script.bin file from the first SD card partitition (note that this partition is FAT - so you can replace the file under Windows or Linux) with the script.bin file from script_GPIO_VGA directory (if you want to change to VGA800x600 mode) or from script_GPIO_LCD_800x480 directory (if you want to change to LCD800x600 mode).
</li>
</ul>

<ul>
<li id="sec-6-4-5-1-2-1">Establish WIFI connection<br/>
<ol>
<li>plug in MOD-WIFI-RTL8188 if the board is not A13-OLinuXino-WIFI



<pre class="src src-sh"><span style="color: #b0c4de;">type</span> ifconfig -a
</pre>

<ul>
<li>Output



<pre class="example">lo Link encap:Local Loopback

         inet addr:127.0.0.1  Mask:255.0.0.0
         UP LOOPBACK RUNNING  MTU:16436  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
tunl0 Link encap:IPIP Tunnel HWaddr

         NOARP  MTU:1480  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
wlan2 Link encap:Ethernet HWaddr 48:02:2a:eb:21:1c

         inet addr:192.168.0.229  Bcast:192.168.0.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:166 errors:0 dropped:726 overruns:0 frame:0
         TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:31361 (30.6 KiB)  TX bytes:1248 (1.2 KiB)
</pre>

<ul>
<li>and look at your wlan number. In this case we have wlan2
</li>
</ul>

</li>
</ul>

</li>
<li>open the file /etc/network/interfaces- for example using vi tool



<pre class="src src-sh">vi /etc/network/interfaces
</pre>

<ul>
<li>and change



<pre class="example">auto wlan2
iface wlan2 inet dhcp
wpa-ssid YourSSIDname
wpa-psk YourWPAkey
reboot A13-OLinuXino board


</pre>

</li>
<li>Chek your connection



<pre class="src src-sh">ifconfig -a
</pre>

<ul>
<li>if everything is ok you should see something as:



<pre class="example">wlan1 Link encap:Ethernet HWaddr 48:02:2a:eb:21:1c

  inet addr:192.168.0.229  Bcast:192.168.0.255  Mask:255.255.255.0
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:166 errors:0 dropped:726 overruns:0 frame:0
  TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:31361 (30.6 KiB)  TX bytes:1248 (1.2 KiB)
</pre>

</li>
</ul>

</li>
</ul>

</li>
</ol>

</li>
</ul>
<ul>
<li id="sec-6-4-5-1-2-2">Establish ethernet connection using USB-ETHERNET adapter recommended supported adapter USB-ETHERNET-AX88772B<br/>
<ol>
<li>plug in USB-ETHERNET-AX88772B adapter
</li>
<li>type



<pre class="src src-sh">ifconfig -a
</pre>

<ul>
<li>you should see something like this



<pre class="example">eth1 Link encap:Ethernet HWaddr 00:80:80:9a:4a:63

         inet addr:192.168.0.113  Bcast:192.168.0.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:58 errors:0 dropped:0 overruns:0 frame:0
         TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:7852 (7.6 KiB)  TX bytes:510 (510.0 B)
lo Link encap:Local Loopback

         inet addr:127.0.0.1  Mask:255.0.0.0
         UP LOOPBACK RUNNING  MTU:16436  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
tunl0 Link encap:IPIP Tunnel HWaddr

         NOARP  MTU:1480  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
</pre>

<ul>
<li>look at your eth number. In this case we have eth1
</li>
</ul>

</li>
</ul>

</li>
<li>open the file /etc/network/interfaces- for example using vi tool



<pre class="src src-sh">vi /etc/network/interfaces
</pre>

<ul>
<li>and change the following rows



<pre class="example">auto eth1
iface eth1 inet dhcp
where eth1 is the interface number
reboot A13-OLinuXino board
</pre>

</li>
<li>or type ifup eth1
</li>
</ul>

</li>
<li>Check your connection



<pre class="src src-sh">ifconfig -a
</pre>

<ul>
<li>if everything is ok you should see something as:



<pre class="example">eth1 Link encap:Ethernet HWaddr 00:80:80:9a:4a:63

         inet addr:192.168.0.113  Bcast:192.168.0.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:725 errors:0 dropped:0 overruns:0 frame:0
         TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:77056 (75.2 KiB)  TX bytes:1686 (1.6 KiB)
</pre>

</li>
</ul>

</li>
</ol>

</li>
</ul>
<ul>
<li id="sec-6-4-5-1-2-3">GPIO changing<br/>
<ol>
<li>lsmod



<pre class="src src-sh"><span style="color: #b0c4de;">type</span> lsmod
</pre>

<ul>
<li>if sun4i-gpio is present - OK
</li>
<li>unless type modprobe sun4i-gpio
</li>
</ul>

</li>
<li>go to /sys/devices/virtual/misc/sun4i-gpio/pins and type ls
<ul>
<li>list of supported pins will be shown
</li>
<li>example for port reading:



<pre class="src src-sh">cat pe4 read PortE4 the result should be 0 or 1 example for port writing: echo 1 &gt; pg9 - turn on LED
</pre>

</li>
</ul>

</li>
</ol>


<ul>
<li id="sec-6-4-5-1-2-3-1">Changing A13 GPIO direction<br/>
<ol>
<li>extract fex2bin_bin2fex_tools on linux machine



<pre class="src src-sh">   sudo su
   <span style="color: #b0c4de;">cd</span> fex2bin_bin2fex_tools directory
   mount /dev/sdx1 /mnt/sd <span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">mount first partitition on SD card</span>
   ./bin2fex /mnt/sd/script.bin &gt; /mnt/sd/script_test.fex <span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">convert bin file to fex</span>
gedit /mnt/sd/script_test.fex
</pre>

</li>
</ol>

</li>
</ul>
<ul>
<li id="sec-6-4-5-1-2-3-2">GPIOs are defined in the end.<br/>
<ul>
<li>where



<pre class="example">Pxx&lt;mode&gt;&lt;pull&gt;&lt;drive&gt;&lt;data&gt; mode 0-7, 0=input, 1=ouput, 2-7 I/O function pull 0=none, 1=up, 2=down drive 0-3, I/O drive level data - data output - logical 0 or 1
</pre>

</li>
<li>for example: if you want to change GPIO direction then change first parameter after port name



<pre class="example">gpio_pin_8 = port:PE08&lt;0&gt;&lt;default&gt;&lt;default&gt;&lt;default&gt;make PE8 input gpio_pin_8 = port:PE08&lt;1&gt;&lt;default&gt;&lt;default&gt;&lt;default&gt;make PE8 output
</pre>

</li>
<li>save and exit
</li>
<li>./fex2bin /mnt/sd/script_test.fex &gt; /mnt/sd/script.bin- convert fex to bin
</li>
</ul>


</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-6-4-5-2">fex2bin and bin2fex - script.bin <a href="http://www.imajeenyus.com/computer/20130301_android_tablet/android/fex2bin_etc.html">{Link}</a><br/>
<ul>
<li id="sec-6-4-5-2-1">Overview<br/>
<ul>
<li>During the boot process, the processor reads a file called script.bin, located in the bootloader (nanda) partition. This file contains all of the processor configuration details (such as pin functions, voltages, clock frequencies, memory configuration etc) and is essential to the correct operation of the tablet. The purpose of this file should be distinguished from that of build.prop, located in /system/build.prop. The latter is a configuration for Android, once it's started. script.bin is configuration for the processor.
</li>
<li>Note that there is also a file in the bootloader partition called script0.bin - this is a backup and must be identical to script.bin.
</li>
<li>For more information on the boot process and the function of script.bin, have a look at these links:
<ul>
<li><a href="http://rhombus-tech.net/allwinner_a10/a10_boot_process/">http://rhombus-tech.net/allwinner_a10/a10_boot_process/</a>
</li>
<li><a href="http://elinux.org/Hack_A10_devices">http://elinux.org/Hack_A10_devices</a>
</li>
<li><a href="http://www.cnx-software.com/2012/05/06/editing-allwinner-a10-board-configuration-files-script-bin/">http://www.cnx-software.com/2012/05/06/editing-allwinner-a10-board-configuration-files-script-bin/</a>
</li>
<li><a href="http://linux-sunxi.org/Sunxi-tools">http://linux-sunxi.org/Sunxi-tools</a>
</li>
<li>The second link above shows a really neat trick where the pins normally intended for interfacing with the SD card are remapped to a UART port, so you can get a serial port by connecting to the SD card slot!
</li>
</ul>

</li>
<li>The script.bin file is actually the binary equivalent of the COMMON_SYS_CONFIG100000 file found in the unpacked Livesuit image. The human-readable version is called a "FEX" file, since that's the extension used by some conversion programs. There are a couple of tools available which can convert between the binary and FEX formats, and these are described below. This - <a href="http://linux-sunxi.org/Fex_Guide">http://linux-sunxi.org/Fex_Guide</a> - is a description of the sections in the FEX file.
<ul>
<li>(There is an online version of these tools available at <a href="https://www.miniand.com/tools/fexc">https://www.miniand.com/tools/fexc</a>, but I couldn't get it to work.)
</li>
</ul>

</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-4-5-2-2">Installation<br/>
<ul>
<li>To get the tools, go to the git repository at <a href="https://github.com/linux-sunxi/sunxi-tools/">https://github.com/linux-sunxi/sunxi-tools/</a> and download the ZIP file (called sunxi-tools-master.zip). Extract this, and place the folder on the Desktop of your Linux machine. Open a terminal, cd to the folder, then run



<pre class="src src-sh">sudo apt-get install libusb-1.0-0-dev
</pre>

<ul>
<li>(this installs libusb, which is required for compilation). Then type make which should compile the files. This creates two programs (actually it creates a lot more, but these are the only two we're interested in) called bin2fex and fex2bin.
</li>
</ul>

</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-4-5-2-3">Using bin2fex<br/>
<ul>
<li>First, get hold of the script.bin file located in the boot loader partition (do this by mounting either the RFSFAT16_BOOTLOADER_00000 from Livesuit, or the actual partition image from the tablet). Place it on the Desktop of your Ubuntu machine. Then, from a terminal on the Desktop, run:



<pre class="src src-sh">sunxi-tools-master/bin2fex script.bin script.fex
</pre>

<ul>
<li>This converts the script.bin file into script.fex. Here's the output produced - script.fex.
</li>
</ul>

</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-4-5-2-4">Using fex2bin<br/>
<ul>
<li>To convert back, it's simply the reverse:



<pre class="src src-sh">sunxi-tools-master/fex2bin script.fex script.bin
</pre>

<ul>
<li>This can then be placed back on the bootloader partition (remember to also overwrite script0.bin).
</li>
</ul>

</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-4-5-2-5">Using fex2bin on the COMMON_SYS_CONFIG100000 LiveSuit file<br/>
<ul>
<li>You can use fex2bin to convert the COMMON_SYS_CONFIG100000 file from the unpacked LiveSuit image into a script.bin file. However, I initially got an error saying "E: CONFIG:696: invalid character at 27" or similar (which means line 696, character 27). Looking at the file, it turned out there were quotes missing at a certain point. Here's the original part of the file:



<pre class="example">[msc_feature]
vendor_name              =USB 2.0
product_name             =USB Flash Driver
To get it to convert properly, I put quotes as follows:

[msc_feature]
vendor_name              ="USB 2.0"
product_name             ="USB Flash Driver"
</pre>

<ul>
<li>I'm not sure why quotes were missed out here, since they're present everywhere else.
</li>
</ul>

</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-4-5-2-6">Which version ends up on the tablet?<br/>
<ul>
<li>If you're eagle-eyed, you may notice something at this point. In the unpacked LiveSuit files, there are essentially two copies of script.bin. One is the human-readable COMMON_SYS_CONFIG100000 file, the other is the script.bin located within the RFSFAT16_BOOTLOADER_00000 image file. The two copies are identical (if you use fex2bin/bin2fex to convert between them, and remember the quotation marks). So, which one actually ends up on the tablet?
</li>
<li>I made a slight modification to one, then the other, packing and burning a complete LiveSuit image each time, and determined that it's the script.bin inside RFSFAT16_BOOTLOADER_00000 which ends up on the tablet (hardly surprising, since RFSFAT16_BOOTLOADER_00000 is a byte-for-byte copy of the nanda tablet partition). To be on the safe side, I would still ensure that COMMON_SYS_CONFIG100000 is identical to the script.bin file - maybe LiveSuit uses COMMON_SYS_CONFIG100000 for its own initial configuration, or something.
</li>
</ul>


</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-6-4-5-3">imx233-olinuxino-with-lcd-4-3-and-touchscreen <a href="http://olimex.wordpress.com/2012/12/17/imx233-olinuxino-with-lcd-4-3-and-touchscreen/">{Link}</a><br/>
</li>
</ul>
<ul>
<li id="sec-6-4-5-4">Product Info <a href="http://microcontrollershop.com/product_info.php?products_id=5557">{Link}</a><br/>
</li>
</ul>
<ul>
<li id="sec-6-4-5-5">Changing A13-OLinuxino settings to VGA800x600 or LCD800x480 <a href="https://www.olimex.com/wiki/Configuration_of_hardware_in_the_debian_image">{Link}</a><br/>

</li>
</ul>
<ul>
<li id="sec-6-4-5-6"><a href="http://olimex.wordpress.com/2012/12/19/a13-lcd7ts-support-in-linux/">http://olimex.wordpress.com/2012/12/19/a13-lcd7ts-support-in-linux/</a><br/>

</li>
</ul>
<ul>
<li id="sec-6-4-5-7">(As of 1 March 2013, the current Debian build for this MICRO version does not yet support a touch panel.)<br/>
<ul>
<li><a href="http://184.172.168.133-static.reverse.softlayer.com/product_info.php?cPath=&amp;products_id=5414">http://184.172.168.133-static.reverse.softlayer.com/product_info.php?cPath=&amp;products_id=5414</a>
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-4-5-8"><a href="https://www.olimex.com/forum/index.php?topic=753.0">How to make 7" LCD Screen working on the A13Micro with Debian or Custom distrib?</a><br/>
</li>
</ul>
</div>
</div>

</div>

<div id="outline-container-6-5" class="outline-3">
<h3 id="sec-6-5">Configure Debian</h3>
<div class="outline-text-3" id="text-6-5">


</div>

<div id="outline-container-6-5-1" class="outline-4">
<h4 id="sec-6-5-1">Configure Wireless (Dynamic IP Address)</h4>
<div class="outline-text-4" id="text-6-5-1">

<ul>
<li id="sec-6-5-1-1">Steps<br/>
<ul>
<li id="sec-6-5-1-1-1">Determine Wireless Device<br/>



<pre class="src src-sh">dmesg
</pre>

<ul>
<li>Found as wlan3
</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-5-1-1-2">Configure /etc/network/interfaces as Root<br/>



<pre class="example">auto wlan3
iface wlan3 inet dhcp
    wpa-ssid TVCOG
    wpa-psk COGpass1
</pre>


</li>
</ul>
<ul>
<li id="sec-6-5-1-1-3">Restart the Networking Service<br/>



<pre class="src src-sh">service networking restart
</pre>


</li>
</ul>
<ul>
<li id="sec-6-5-1-1-4">Test the Network<br/>



<pre class="src src-sh">ifconfig
ping google.com
</pre>


</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-6-5-1-2">Links<br/>
<ul>
<li><a href="http://blog.tplus1.com/blog/2008/06/13/how-to-connect-to-a-wireless-network-from-the-ubuntu-command-line/">How to connect to a wireless network from the ubuntu command line</a>
</li>
<li><a href="http://www.cyberciti.biz/faq/debian-linux-wpa-wpa2-wireless-wifi-networking/">debian linux wpa wpa2 wireless wifi networking</a>
</li>
</ul>

</li>
</ul>
</div>

</div>

<div id="outline-container-6-5-2" class="outline-4">
<h4 id="sec-6-5-2">Configure Static IP Address</h4>
<div class="outline-text-4" id="text-6-5-2">

<ul>
<li id="sec-6-5-2-1">Steps<br/>
<ul>
<li id="sec-6-5-2-1-1">Determine Information<br/>



<pre class="src src-sh">ifconfig
</pre>

<ul>
<li>Find:
<ul>
<li>address
</li>
<li>netmask
</li>
<li>gateway
</li>
<li>DNS Servers
</li>
</ul>

</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-5-2-1-2">Modify /etc/network/interfaces as Root<br/>



<pre class="example">auto wlan3
iface wlan3 inet static
   wpa-ssid TVCOG
   wpa-psk COGpass1
   address 192.168.12.222
   netmask 255.255.255.0
   gateway 192.168.12.1
</pre>

</li>
</ul>
<ul>
<li id="sec-6-5-2-1-3">Modify /etc/resolv.conf as Root<br/>



<pre class="example">domain techvalleycenterofgravity.com
search techvalleycenterofgravity.com
nameserver 64.22.32.8
nameserver 64.22.32.9
</pre>

</li>
</ul>
<ul>
<li id="sec-6-5-2-1-4">Restart Networking as Root<br/>



<pre class="src src-sh">/etc/init.d/networking restart
</pre>

</li>
</ul>
<ul>
<li id="sec-6-5-2-1-5">Test Results<br/>



<pre class="src src-sh">ifconfig
ping google.com
</pre>

</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-6-5-2-2">Links<br/>
<ul>
<li><a href="http://www.howtoforge.com/linux-basics-set-a-static-ip-on-ubuntu">Linux Basics set a Static IP on Ubuntu</a>
</li>
</ul>

</li>
</ul>
</div>

</div>

<div id="outline-container-6-5-3" class="outline-4">
<h4 id="sec-6-5-3">Set Date</h4>
<div class="outline-text-4" id="text-6-5-3">

<ul>
<li id="sec-6-5-3-1">Steps<br/>



<pre class="src src-sh">date --set=<span style="color: #ffc1c1;">"10 JUL 2013 12:27:00"</span>
</pre>

</li>
</ul>
<ul>
<li id="sec-6-5-3-2">Links<br/>
<ul>
<li><a href="http://www.cyberciti.biz/faq/howto-set-date-time-from-linux-command-prompt/">http://www.cyberciti.biz/faq/howto-set-date-time-from-linux-command-prompt/</a>
</li>
</ul>

</li>
</ul>
</div>

</div>

<div id="outline-container-6-5-4" class="outline-4">
<h4 id="sec-6-5-4">Set Keyboard Locale</h4>
<div class="outline-text-4" id="text-6-5-4">

<ul>
<li id="sec-6-5-4-1">Overview<br/>
<ul>
<li>My keyboard layout was set to UK, which meant I typed things like &not; instead of ~ and &pound; instead of #.
</li>
<li>This can easily be remidied from the commandline.
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-5-4-2">Steps<br/>
<ol>
<li>Modify the keyboard locale



<pre class="src src-sh">sudo dpkg-reconfigure keyboard-configuration
</pre>

</li>
<li>reboot



<pre class="src src-sh">reboot -h now
</pre>

</li>
</ol>

</li>
</ul>
<ul>
<li id="sec-6-5-4-3">Links<br/>
<ul>
<li><a href="http://askubuntu.com/questions/155424/changing-keyboard-layout-in-ubuntu-12-04-server-command-line-interface">AskUbuntu.com: Changing keyboard layout in ubuntu 12.04 server command-line interface</a>
</li>
</ul>

</li>
</ul>
</div>

</div>

<div id="outline-container-6-5-5" class="outline-4">
<h4 id="sec-6-5-5">Install Programs</h4>
<div class="outline-text-4" id="text-6-5-5">

<ul>
<li id="sec-6-5-5-1">Steps<br/>
<ol>
<li>update packages 



<pre class="src src-sh">apt-get update; apt-get upgrade; apt-get dist-upgrade
</pre>

</li>
<li>install packages



<pre class="src src-sh">apt-get install aptitude emacs build-essentials pkg-config
</pre>

<ul>
<li>emacs is obviously "optional" but is the preferred text-editor of choice for <a href="http://xkcd.com/378/">real programmers</a> ;)
</li>
</ul>

</li>
</ol>

</li>
</ul>
</div>

</div>

<div id="outline-container-6-5-6" class="outline-4">
<h4 id="sec-6-5-6">Configure SSH to start on Boot</h4>
<div class="outline-text-4" id="text-6-5-6">

<ul>
<li id="sec-6-5-6-1">Steps<br/>
<ul>
<li id="sec-6-5-6-1-1">Install ssh server<br/>



<pre class="src src-sh">apt-get install openssh-server
</pre>

</li>
</ul>
<ul>
<li id="sec-6-5-6-1-2">Create or modify the /etc/init.d/sshd init script as follows:<br/>



<pre class="src src-sh"><span style="color: #fa8072;">#</span><span style="color: #ff7f24; font-style: italic;">! /bin/</span><span style="color: #00ffff;">sh</span>
<span style="color: #fa8072;">#</span>
<span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">start/stop the secure shell daemon</span>

<span style="color: #00ffff;">case</span> <span style="color: #ffc1c1;">"$1"</span><span style="color: #00ffff;"> in</span>
<span style="color: #ffc1c1;">'start'</span>)

    <span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">Start the ssh daemon</span>
    <span style="color: #00ffff;">if</span> [ -x /usr/sbin/sshd ]; <span style="color: #00ffff;">then</span>
            <span style="color: #b0c4de;">echo</span> <span style="color: #ffc1c1;">"starting SSHD daemon"</span>
            /usr/sbin/sshd &amp;
    <span style="color: #00ffff;">fi</span>
    ;;

<span style="color: #ffc1c1;">'stop'</span>)
    <span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">Stop the ssh daemon</span>
    /usr/bin/pkill -x sshd
    ;;
*)
    <span style="color: #b0c4de;">echo</span> <span style="color: #ffc1c1;">"usage: /etc/init.d/sshd {start|stop}"</span>
;;
</pre>

</li>
</ul>
<ul>
<li id="sec-6-5-6-1-3">Check that /etc/rc3.d/S89sshd exists (or any sshd startup script exists) and is a soft link to /etc/init.d/sshd.<br/>
<ul>
<li>If not, create it using the following command:



<pre class="src src-sh">ln -s /etc/init.d/sshd /etc/rc3.d/S89sshd
</pre>

</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-5-6-1-4">Determine that ssh is running<br/>



<pre class="src src-sh">service ssh status
</pre>

</li>
</ul>
<ul>
<li id="sec-6-5-6-1-5">Determine Port Open<br/>



<pre class="src src-sh">netstat -tlpn
</pre>

<ul>
<li>Port is: 22122
</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-5-6-1-6">Determine IP Address to connect to<br/>



<pre class="src src-sh">ifconfig
</pre>


</li>
</ul>
<ul>
<li id="sec-6-5-6-1-7">Connect to ssh<br/>



<pre class="src src-sh">ssh root@192.168.12.128 -p 22122
</pre>

</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-6-5-6-2">Debugging<br/>
<ul>
<li>Check ports being listened on



<pre class="src src-sh">netstat -an | grep <span style="color: #ffc1c1;">"LISTEN"</span>
</pre>

</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-5-6-3">Links<br/>
<ul>
<li><a href="http://publib.boulder.ibm.com/infocenter/tivihelp/v8r1/index.jsp?topic=%2Fcom.ibm.tnpm.doc%2Finstall%2Fttnpm_installguide_stepconfigureopensshservertostartuponsystemboot-14-12.html">Configure Open SSH Server To Start Up On System Boot</a>
</li>
<li><a href="http://raspberrypi.stackexchange.com/questions/4709/ssh-connection-refused-on-raspberry-pi-cannot-find-why">SSH Connection Refused On Raspberry Pi Cannot Find Why</a>
</li>
</ul>

</li>
</ul>
</div>

</div>

<div id="outline-container-6-5-7" class="outline-4">
<h4 id="sec-6-5-7">Install XFCE (Optional)</h4>
<div class="outline-text-4" id="text-6-5-7">

<ul>
<li id="sec-6-5-7-1">Overview<br/>
<ul>
<li>Most of this guide is dedicated to setting up this micro-controller to run QT Embedded, which allows the use of graphical programs without runnng a graphical desktop (XFCE).  That being said it is possible to install one, I haven't worked on getting touchscreen support working with it, but Olimex has posted a few tutorials and it does work fine with a mouse.
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-5-7-2">Steps<br/>



<pre class="src src-sh">apt-get install --no-install-recommends xorg xfce4 alsa-base alsa-utils;
apt-get install --no-install-recommends cpufrequtils gamin xdg-utils;
apt-get install --no-install-recommends desktop-base gnome-icon-theme dmz-cursor-theme;
apt-get install --no-install-recommends xfce4-terminal xfce4-power-manager xfce4-screenshooter;
startx;
</pre>

</li>
</ul>
<ul>
<li id="sec-6-5-7-3">Links<br/>
<ul>
<li id="sec-6-5-7-3-1">Installing GUI<br/>
<a href="http://lcncolinuxino.blogspot.com/p/installing-gui.html">http://lcncolinuxino.blogspot.com/p/installing-gui.html</a>
<ul>
<li id="sec-6-5-7-3-1-1">Overview<br/>
Optionally if desired, a GUI user interface can be installed. This section describes how to install a small foot print xfce4 user interface.
</li>
</ul>
<ul>
<li id="sec-6-5-7-3-1-2">Steps<br/>



<pre class="src src-sh">apt-get install --no-install-recommends xorg xfce4 alsa-base alsa-utils;
apt-get install --no-install-recommends cpufrequtils gamin xdg-utils;
apt-get install --no-install-recommends desktop-base gnome-icon-theme dmz-cursor-theme;
apt-get install --no-install-recommends xfce4-terminal xfce4-power-manager xfce4-screenshooter;
apt-get install --no-install-recommends thunar-archive-plugin thunar-media-tags-plugin;
apt-get install --no-install-recommends xfburn htop squeeze bzip2 zip unzip unrar-free;
<span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">Finally start the user interface with:</span>
startx;
</pre>

</li>
</ul>
<ul>
<li id="sec-6-5-7-3-1-3">Links<br/>
<ul>
<li>
</li>
</ul>


</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>

</div>

<div id="outline-container-6-6" class="outline-3">
<h3 id="sec-6-6">Configure Serial Communication with Bluetooth Module</h3>
<div class="outline-text-3" id="text-6-6">


</div>

<div id="outline-container-6-6-1" class="outline-4">
<h4 id="sec-6-6-1">Communicate to Bluetooth</h4>
<div class="outline-text-4" id="text-6-6-1">

<ul>
<li id="sec-6-6-1-1">Connecting<br/>
</li>
</ul>
<ul>
<li id="sec-6-6-1-2">Installation<br/>
<ul>
<li id="sec-6-6-1-2-1">Connect to Linvar<br/>
Passphrase: 1234

</li>
</ul>
<ul>
<li id="sec-6-6-1-2-2"><a name="rfcomm" id="rfcomm"></a>Configure /etc/bluetooth/rfcomm.conf<br/>



<pre class="example">#
# RFCOMM configuration file.
#

rfcomm0 {
        # Automatically bind the device at startup
        bind no;

        # Bluetooth address of the device
        device 00:12:03:27:71:07;

        # RFCOMM channel for the connection
        channel 1;

        # Description of the connection
        comment "Example Bluetooth device";
}
</pre>


</li>
</ul>
<ul>
<li id="sec-6-6-1-2-3">Restart Bluetooth<br/>



<pre class="src src-sh">service bluetooth restart
</pre>


</li>
</ul>
<ul>
<li id="sec-6-6-1-2-4">Determine the Hardware Address<br/>
The hardware address should be replaced with that of your phone. If you don't know the hardware address of your phone yet, you can get it by running:

</li>
</ul>
<ul>
<li id="sec-6-6-1-2-5">Bind the Address<br/>



<pre class="src src-sh">sudo rfcomm bind 0 00:12:03:27:71:07
</pre>

</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-6-6-1-3">Links<br/>
<ul>
<li><a href="http://www.thinkwiki.org/wiki/How_to_setup_Bluetooth">How to setup Bluetooth</a>
</li>
</ul>

</li>
</ul>
</div>

</div>

<div id="outline-container-6-6-2" class="outline-4">
<h4 id="sec-6-6-2">Get Serial Over Linux</h4>
<div class="outline-text-4" id="text-6-6-2">

<ul>
<li id="sec-6-6-2-1">Installation<br/>
<ul>
<li id="sec-6-6-2-1-1">Determine hardware a<br/>
</li>
</ul>
<ul>
<li id="sec-6-6-2-1-2">Modify /etc/bluetooth/rfcomm.conf as Root<br/>



<pre class="example">rfcomm2 {
        # Automatically bind the device at startup
        bind no;

        # Bluetooth address of the device
        device 00:12:03:27:71:07;

        # RFCOMM channel for the connection
        channel 1;

        # Description of the connection
        comment "Olimex";
}
</pre>

</li>
</ul>
<ul>
<li id="sec-6-6-2-1-3">Restart Bluetooth<br/>



<pre class="src src-sh">sudo service bluetooth restart
</pre>


</li>
</ul>
</li>
</ul>
<ul>
<li id="sec-6-6-2-2">Connecting<br/>
<ol>
<li>Initialize Connection



<pre class="src src-sh">sudo rfcomm connect rfcomm2
</pre>

</li>
<li>Connect with Screen



<pre class="src src-sh">screen /dev/rfcomm2 115200
</pre>

</li>
<li>Login
</li>
</ol>

</li>
</ul>
<ul>
<li id="sec-6-6-2-3">Links<br/>
<ul>
<li><a href="http://www.cyberciti.biz/hardware/5-linux-unix-commands-for-connecting-to-the-serial-console/">5 linux unix commands for connecting to the serial console</a>
</li>
<li><a href="http://www.heatxsink.com/entry/how-to-pair-a-bluetooth-device-from-command-line-on-linux">how to pair a bluetooth device from command line on linux</a>
</li>
</ul>

</li>
</ul>
</div>
</div>

</div>

<div id="outline-container-6-7" class="outline-3">
<h3 id="sec-6-7">Install ARM Toolchain with Buildroot</h3>
<div class="outline-text-3" id="text-6-7">


</div>

<div id="outline-container-6-7-1" class="outline-4">
<h4 id="sec-6-7-1">Steps</h4>
<div class="outline-text-4" id="text-6-7-1">

<ol>
<li>Download Buildroot



<pre class="src src-sh">mkdir bld; <span style="color: #b0c4de;">cd</span> bld
wget http://buildroot.net/downloads/buildroot-2013.05.tar.gz
tar -xvf buildroot-2013.05.tar.gz
<span style="color: #b0c4de;">cd</span> buildroot-2013.05
</pre>


</li>
<li>Run Menu Config



<pre class="src src-sh">make menuconfig
</pre>

<ul>
<li>Relevant Configurations:
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<tbody>
<tr><td class="left">Target Architecture</td><td class="left">ARM (little endian)</td></tr>
<tr><td class="left">Target Architecture Variant</td><td class="left">Cortex-A8</td></tr>
<tr><td class="left">Toolchain</td><td class="left">Sourcery Codebench ARM 2011.09</td></tr>
</tbody>
</table>

</li>
</ul>

</li>
<li>If you are on a 64-bit system



<pre class="src src-sh">sudo apt-get install ia32-libs
</pre>

<ul>
<li>See Error

</li>
</ul>

</li>
<li>Install toolchain binaries



<pre class="src src-sh">su
cp -a ext-toolchain /opt/ext_toolchain
cp /etc/environment /etc/environment.BAK
</pre>

<ul>
<li>Append :/opt/ext_toolchain/bin/ to Path



<pre class="example">PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/ext_toolchain/bin/"
</pre>


</li>
</ul>

</li>
<li>Logout and Login or Reboot
</li>
</ol>



<ul>
<li id="sec-6-7-1-1">Buildroot Toolchain Error: "error while loading shared libraries: libstdc++.so.6"<br/>
<ul>
<li id="sec-6-7-1-1-1">Error:<br/>
<ul>
<li>error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-7-1-1-2">Probable Cause<br/>
<ul>
<li>Its looking for 32-bit library, which is not installed since I have a 64-bit system
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-7-1-1-3">Solution<br/>
<ul>
<li>Install the 32 bit libraries
</li>
</ul>




<pre class="src src-sh">sudo apt-get install ia32-libs
</pre>

</li>
</ul>
<ul>
<li id="sec-6-7-1-1-4">Links<br/>
<ul>
<li><a href="http://stackoverflow.com/questions/11471722/libstdc-so-6-cannot-open-shared-object-file-no-such-file-or-directory">http://stackoverflow.com/questions/11471722/libstdc-so-6-cannot-open-shared-object-file-no-such-file-or-directory</a>
</li>
</ul>

</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-6-7-2" class="outline-4">
<h4 id="sec-6-7-2">Links</h4>
<div class="outline-text-4" id="text-6-7-2">

<ul>
<li><a href="./doc/using-buildroot-real-project.pdf">Using buildroot for real projects</a>
<ul>
<li>This is a great presentation that demonstrates how to use buildroot very clearly.
</li>
</ul>

</li>
</ul>

</div>
</div>

</div>

<div id="outline-container-6-8" class="outline-3">
<h3 id="sec-6-8">Configure tslib on Device</h3>
<div class="outline-text-3" id="text-6-8">


</div>

<div id="outline-container-6-8-1" class="outline-4">
<h4 id="sec-6-8-1">Overview</h4>
<div class="outline-text-4" id="text-6-8-1">




<pre class="example">One of the first problems we had with OLinuxIno-A13 board is the touchscreen support.
The manual was published on the official Olimex blog, but source packages had updated, so old solution didn't give an effect.
After some experiments, we solved this problem.
Here is a full step-by-step manual how to get the device works well under Debian
</pre>

<ul>
<li><a href="http://www.dimrobotics.com/2013/06/olinuxino-a13-touchscreen-support-in.html">Dimrobotics</a>
</li>
</ul>

</div>

</div>

<div id="outline-container-6-8-2" class="outline-4">
<h4 id="sec-6-8-2">Steps</h4>
<div class="outline-text-4" id="text-6-8-2">

<ol>
<li>Install make and automake



<pre class="src src-sh">apt-get install make automake
</pre>

</li>
<li>Download tslib source code and go to its directory:



<pre class="src src-sh">git clone https://github.com/kergoth/tslib.git
<span style="color: #b0c4de;">cd</span> tslib
</pre>

</li>
<li>Download and apply the patch using GNU patch utility:



<pre class="src src-sh">wget https://raw.github.com/webconn/OLINUXINO/master/SOFTWARE/A13/TOUCHSCREEN/tslib.patch
patch -p0 &lt; tslib.patch
</pre>

</li>
<li>Configure, make and install:



<pre class="src src-sh">autoreconf -vi
./configure --prefix=/usr
make
make install
</pre>

</li>
<li>Then, let's load a kernel module and check touchscreen:



<pre class="src src-sh">modprobe sun4i-ts
dmesg | grep sun4i-ts
</pre>

<ul>
<li>Result



<pre class="example">[12951.630000] sun4i-ts.c: sun4i_ts_init: start ...
[12951.640000] sun4i-ts: tp_screen_size is 5 inch.
[12951.650000] sun4i-ts: tp_regidity_level is 5.
[12951.660000] sun4i-ts: tp_press_threshold_enable is 0.
[12951.670000] sun4i-ts: rtp_sensitive_level is 15.
[12951.670000] sun4i-ts: rtp_exchange_x_y_flag is 0.
[12951.690000] sun4i-ts.c: sun4i_ts_probe: start...
[12951.710000] input: sun4i-ts as /devices/platform/sun4i-ts/input/input4
[12951.730000] sun4i-ts.c: sun4i_ts_probe: end
</pre>

</li>
</ul>

</li>
<li>To load this kernel module automatically, add a line into /etc/modules:



<pre class="src src-sh"><span style="color: #b0c4de;">echo</span> sun4i-ts &gt;&gt; /etc/modules
</pre>

</li>
<li>Export Some Variables



<pre class="src src-sh"><span style="color: #b0c4de;">export</span> <span style="color: #7fffd4;">TSLIB_TSEVENTTYPE</span>=raw
<span style="color: #b0c4de;">export</span> <span style="color: #7fffd4;">TSLIB_CONSOLEDEVICE</span>=none
<span style="color: #b0c4de;">export</span> <span style="color: #7fffd4;">TSLIB_FBDEVICE</span>=/dev/fb0
<span style="color: #b0c4de;">export</span> <span style="color: #7fffd4;">TSLIB_TSDEVICE</span>=/dev/input/event4
<span style="color: #b0c4de;">export</span> <span style="color: #7fffd4;">TSLIB_CALIBFILE</span>=/usr/etc/pointercal
<span style="color: #b0c4de;">export</span> <span style="color: #7fffd4;">TSLIB_CONFFILE</span>=/usr/etc/ts.conf
<span style="color: #b0c4de;">export</span> <span style="color: #7fffd4;">TSLIB_PLUGINDIR</span>=/usr/lib/tsg
</pre>

</li>
<li>Next, configure raw input module of the tslib.
<ul>
<li>Open /usr/etc/ts.conf and uncomment the line which contains "module_raw input".
</li>
</ul>

</li>
<li>To load configuration variables while system is loading, write these lines into /etc/environment file (check highlighted number):



<pre class="example">TSLIB_TSEVENTTYPE=raw
TSLIB_CONSOLEDEVICE=none
TSLIB_FBDEVICE=/dev/fb0
TSLIB_TSDEVICE=/dev/input/event3
TSLIB_CALIBFILE=/etc/pointercal
TSLIB_CONFFILE=/usr/etc/ts.conf
TSLIB_PLUGINDIR=/usr/lib/ts
</pre>

</li>
</ol>

</div>

</div>

<div id="outline-container-6-8-3" class="outline-4">
<h4 id="sec-6-8-3">Errors</h4>
<div class="outline-text-4" id="text-6-8-3">

<ul>
<li id="sec-6-8-3-1">undefined macro: AC_DISABLE_STATIC<br/>
<ul>
<li id="sec-6-8-3-1-1">Error Caused<br/>
<ul>
<li>while attempting to do "autoreconf -vi" when building tslib
</li>
</ul>

</li>
</ul>
<ul>
<li id="sec-6-8-3-1-2">Error Message<br/>



<pre class="example">configure.ac:24: error: possibly undefined macro: AC_DISABLE_STATIC
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
</pre>

</li>
</ul>
<ul>
<li id="sec-6-8-3-1-3">Solution<br/>



<pre class="src src-sh">apt-get install libtool
</pre>

</li>
</ul>
<ul>
<li id="sec-6-8-3-1-4">Links<br/>
<ul>
<li><a href="http://www.friendlyarm.net/forum/topic/621">http://www.friendlyarm.net/forum/topic/621</a>
</li>
</ul>

</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-6-8-4" class="outline-4">
<h4 id="sec-6-8-4">Test tslib Input Received from Touchscreen</h4>
<div class="outline-text-4" id="text-6-8-4">




<pre class="src src-sh">cat /dev/input/event3 | hexdump
</pre>

</div>

</div>

<div id="outline-container-6-8-5" class="outline-4">
<h4 id="sec-6-8-5">Links</h4>
<div class="outline-text-4" id="text-6-8-5">

<ul>
<li><a href="http://www.dimrobotics.com/2013/06/olinuxino-a13-touchscreen-support-in.html">http://www.dimrobotics.com/2013/06/olinuxino-a13-touchscreen-support-in.html</a>
</li>
<li><a href="http://www.armadeus.com/wiki/index.php?title=Qt/Embedded#Touchscreen_handling">http://www.armadeus.com/wiki/index.php?title=Qt/Embedded#Touchscreen_handling</a>
</li>
</ul>

</div>
</div>

</div>

<div id="outline-container-6-9" class="outline-3">
<h3 id="sec-6-9">Configure QT for Embedded Linux</h3>
<div class="outline-text-3" id="text-6-9">


</div>

<div id="outline-container-6-9-1" class="outline-4">
<h4 id="sec-6-9-1">Steps</h4>
<div class="outline-text-4" id="text-6-9-1">

<ul>
<li id="sec-6-9-1-1">Install QT on Development Platform<br/>
<a href="http://suchakra.wordpress.com/2011/05/17/qt-on-mini2440/">http://suchakra.wordpress.com/2011/05/17/qt-on-mini2440/</a>



<pre class="src src-sh">sudo apt-get install qtcreator
</pre>

</li>
</ul>
<ul>
<li id="sec-6-9-1-2">Install TSLIB on Development Platform<br/>
<a href="http://billforums.station51.net/viewtopic.php?f=8&amp;t=15">http://billforums.station51.net/viewtopic.php?f=8&amp;t=15</a>



<pre class="src src-sh"><span style="color: #b0c4de;">cd</span> ~/src
git clone https://github.com/kergoth/tslib.git tslib
<span style="color: #b0c4de;">cd</span> tslib
<span style="color: #fa8072;"># </span><span style="color: #ff7f24; font-style: italic;">custom patch for Olinuxino</span>
wget https://raw.github.com/webconn/OLINUXINO/master/SOFTWARE/A13/TOUCHSCREEN/tslib.patch
     patch -p0 &lt; tslib.patch
./autogen.sh
./configure --host=arm-linux-gnueabihf --prefix=/usr/local/tslib --enable-static --enable-shared
make -j5
su
<span style="color: #b0c4de;">export</span> <span style="color: #7fffd4;">PATH</span>=$<span style="color: #7fffd4;">PATH</span>:opt/ext_toolchain/bin/
make install
</pre>

<ul>
<li>Make sure to modify qmake.conf file when installing qt-embedded by including:



<pre class="example">QMAKE_INCDIR  += /usr/local/tslib/include
QMAKE_LIBDIR  += /usr/local/tslib/lib
</pre>

</li>
</ul>


</li>
</ul>
<ul>
<li id="sec-6-9-1-3">Install qt-everywhere on Development Platform<br/>
<ul>
<li id="sec-6-9-1-3-1">Steps<br/>
<ol>
<li>Install Source



<pre class="src src-sh">tar -xvf qt-everywhere-opensource-src-4.6.2.tar.gz /usr/local/qt
</pre>

</li>
<li>Replace the whole text in mkspecs/qws/linux-arm-g++/qmake.conf by the following:



<pre class="example">#
# qmake configuration for building with arm-linux-g++
#
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

# modifications to g++.conf
QMAKE_CC                = arm-linux-gnueabihf-gcc -mcpu=cortex-a8 -mtune=cortex-a8 -O0 -mfpu=neon -lrt
QMAKE_CXX               = arm-linux-gnueabihf-g++ -mcpu=cortex-a8 -mtune=cortex-a8 -O0 -mfpu=neon -lrt
QMAKE_LINK              = arm-linux-gnueabihf-g++ -mcpu=cortex-a8 -mtune=cortex-a8 -O0 -mfpu=neon -lrt
QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++ -mcpu=cortex-a8 -mtune=cortex-a8 -O0 -mfpu=neon -lrt

# modifications to linux.conf
QMAKE_AR                = arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy
QMAKE_STRIP             = arm-linux-gnueabihf-strip
QMAKE_RANLIB            = arm-linux-gnueabihf-ranlib

# tslib
QMAKE_INCDIR  += /usr/local/tslib/include
QMAKE_LIBDIR  += /usr/local/tslib/lib
QMAKE_LFLAGS += -Wl,-rpath-link=/usr/local/tslib/lib

load(qt_config)

</pre>

</li>
<li>Configure Qt



<pre class="src src-sh">make clean; ./configure -embedded arm -prefix /usr/local/qt -little-endian -no-qt3support -no-cups -no-largefile -optimized-qmake -no-openssl -xplatform qws/linux-arm-g++ -nomake tools -nomake examples -no-webkit -opensource -confirm-license -qt-mouse-tslib
</pre>

<ul>
<li>Some optional arguments depending on your requirements
<ul>
<li>Enable touchscreen library support : -qt-mouse-tslib
</li>
<li>Enable USB keyboard support : -qt-kbd-linuxinput
</li>
</ul>

</li>
<li>The above options affect the QtGui library so you need to replace only QtGui.so.x.x file on your root filesystem if you are planning to make changes.
</li>
</ul>

</li>
<li>Make



<pre class="src src-sh">make -j 5
sudo make install
</pre>

<ul>
<li>Wait for a couple of hours to compile libraries
</li>
</ul>

</li>
<li>Install



<pre class="src src-sh">su -p
make install
</pre>

<ul>
<li>libraries will be installed in <i>usr/local/qt/lib</i>
</li>
</ul>

</li>
</ol>

</li>
</ul>
<ul>
<li id="sec-6-9-1-3-2">Errors<br/>
<ul>
<li><i>opt/ext_toolchain/bin</i>../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lbootstrap
</li>
</ul>

<p><a href="http://www.qtcentre.org/archive/index.php/t-41850.html">http://www.qtcentre.org/archive/index.php/t-41850.html</a>
</p></li>
</ul>
</li>
</ul>
<ul>
<li id="sec-6-9-1-4">Copy Libraries Over to Device<br/>
<ul>
<li id="sec-6-9-1-4-1">Steps<br/>
<ol>
<li>Copy qt libraries to device.



<pre class="src src-sh">rsync -rtvz -a -e <span style="color: #ffc1c1;">"ssh -p 22122"</span> /usr/local/qt/ root@192.168.12.200:/usr/local/qt/
</pre>

</li>
<li>Add some environment variables to by adding the following lines to /etc/environment.



<pre class="example">LD_LIBRARY_PATH=/usr/local/qt/lib
QTDIR=/usr/local/qt
QWS_MOUSE_PROTO=tslib:/dev/input/event2
QWS_DISPLAY=LinuxFB:mmWidth=310:mmHeight=190
</pre>

<ul>
<li>To add mouse support you could have a line such as:



<pre class="example">export QWS_MOUSE_PROTO=IntelliMouse:/dev/input/event2
</pre>

</li>
</ul>

</li>
<li>Try running a sample application.  You should have demos installed at <i>usr/local/qt/demos/embedded</i>
<ul>
<li>Try running styledemo:



<pre class="src src-sh"><span style="color: #b0c4de;">cd</span> /usr/local/qt/demos/embedded/
./styledemo/styledemo -qws
</pre>

</li>
<li>Or fluidlauncher



<pre class="src src-sh"><span style="color: #b0c4de;">cd</span> /usr/local/qt/demos/embedded/
./fluidlauncher/fluidlauncher -qws
</pre>

</li>
</ul>

</li>
</ol>

</li>
</ul>
<ul>
<li id="sec-6-9-1-4-2">Warning<br/>
<ul>
<li>/dev/input/event# may change depending on the ordering and number of USB inputs you have plugged in.
</li>
<li>Booting with a mouse and a keyboard plugged in will result in a different event # for touchscreen than without.
</li>
<li>To check what different events are, trying inputting data with the mouse/keyboard/touchscreen and seeing which outputs data



<pre class="src src-sh">cat /dev/input/event1 | hexdump
</pre>

</li>
</ul>

</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-6-9-2" class="outline-4">
<h4 id="sec-6-9-2">Links</h4>
<div class="outline-text-4" id="text-6-9-2">

<ul>
<li><a href="http://qt-project.org/wiki/Building_Qt_for_Embedded_Linux">http://qt-project.org/wiki/Building_Qt_for_Embedded_Linux</a>
</li>
<li><a href="http://qt-project.org/doc/qt-4.8/qt-embedded-install.html">http://qt-project.org/doc/qt-4.8/qt-embedded-install.html</a>
</li>
<li><a href="https://www.olimex.com/forum/index.php?topic=399.0">https://www.olimex.com/forum/index.php?topic=399.0</a>



<pre class="example">./configure -xplatform qws/linux-arm-g++ -embedded arm -prefix /usr/qtarm/usr/local/qt-embedded -qt-gfx-linuxfb -qt-gfx-vnc -no-largefile -exceptions -no-accessibility -no-qt3support -no-sse2 -qt-zlib -no-gif -no-libtiff -qt-libpng -no-libmng -qt-libjpeg -openssl -no-nis -no-cups -depths 16 -qt-kbd-linuxinput -nomake demos -nomake examples -qt-mouse-linuxinput -qt-mouse-tslib
</pre>

</li>
<li><a href="https://code.google.com/p/a13-olinuxino/wiki/PageName">https://code.google.com/p/a13-olinuxino/wiki/PageName</a>
</li>
<li><a href="https://www.olimex.com/forum/index.php?topic=751.msg3702#msg3702">https://www.olimex.com/forum/index.php?topic=751.msg3702#msg3702</a>
</li>
<li><a href="http://suchakra.wordpress.com/2011/05/30/developing-qt-apps/">http://suchakra.wordpress.com/2011/05/30/developing-qt-apps/</a>
</li>
<li><a href="https://code.google.com/p/a13-olinuxino/source/browse/CrossNG.wiki?repo=wiki">https://code.google.com/p/a13-olinuxino/source/browse/CrossNG.wiki?repo=wiki</a>
</li>
<li><a href="./doc/Getting Started with Qt.pdf">Getting started with Qt.pdf</a>
<ul>
<li>has working notes for proper installation of tslib.
</li>
</ul>

</li>
</ul>

</div>
</div>
</div>

</div>

<div id="outline-container-7" class="outline-2">
<h2 id="sec-7">Simple Sample Programs</h2>
<div class="outline-text-2" id="text-7">


</div>

<div id="outline-container-7-1" class="outline-3">
<h3 id="sec-7-1">Vital Vio Controller</h3>
<div class="outline-text-3" id="text-7-1">


</div>

<div id="outline-container-7-1-1" class="outline-4">
<h4 id="sec-7-1-1">Main.cpp</h4>
<div class="outline-text-4" id="text-7-1-1">




<pre class="src src-cpp"><span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">------------------------------------------------------------------ :Libraries:</span>
<span style="color: #fa8072;">//                      </span><span style="color: #ff7f24; font-style: italic;">_    _ _                 _        </span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |  (_) |__ _ _ __ _ _ _(_)___ ___</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |__| | '_ \ '_/ _` | '_| / -_|_-&lt;</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">|____|_|_.__/_| \__,_|_| |_\___/__/</span>
<span style="color: #fa8072;">//                                                        </span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">"mainwindow.h"</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;QApplication&gt;</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;QWSServer&gt;</span>

<span style="color: #63b8ff;">int</span> main(<span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">argc</span>, <span style="color: #63b8ff;">char</span> *<span style="color: #7fffd4;">argv</span>[])
{
    <span style="color: #63b8ff;">QApplication</span> <span style="color: #7fffd4;">a</span>(argc, argv);


    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Change the background Color</span>
    <span style="color: #63b8ff;">QPalette</span> <span style="color: #7fffd4;">pal</span> = a.palette();
    pal.setColor(<span style="color: #8470ff; font-weight: bold;">QPalette</span>::Window, <span style="color: #8470ff; font-weight: bold;">Qt</span>::black);
    a.setPalette(pal);

<span style="color: #6495ed; font-style: italic;">#ifdef</span> Q_WS_QWS
    <span style="color: #8470ff; font-weight: bold;">QWSServer</span>::<span style="color: #63b8ff;">setCursorVisible</span>( <span style="color: #8470ff; font-weight: bold;">false</span> );
<span style="color: #6495ed; font-style: italic;">#endif</span>

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Start the GUI</span>
    <span style="color: #63b8ff;">MainWindow</span> <span style="color: #7fffd4;">w</span>;
    w.showFullScreen();
    w.show();

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Exit the program</span>
    <span style="color: #00ffff;">return</span> a.exec();
}
</pre>

</div>

</div>

<div id="outline-container-7-1-2" class="outline-4">
<h4 id="sec-7-1-2">MainWindow.cpp</h4>
<div class="outline-text-4" id="text-7-1-2">




<pre class="src src-cpp"><span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @file mainwindow.cpp</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief A basic Vital Vio Controller.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> *  A graphical interface to control lights.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> *  @title Vital Vio</span>
<span style="color: #ff7f24; font-style: italic;"> *  @author Nicholas Guthrie</span>
<span style="color: #ff7f24; font-style: italic;"> *  @web http//nickguthrie.com/embedd_gui/doc/</span>
<span style="color: #ff7f24; font-style: italic;"> *  @created July 29, 2013</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> * This program is free software: you can redistribute it and/or modify it under</span>
<span style="color: #ff7f24; font-style: italic;"> * the terms of the GNU Lesser General Public License as published by the Free</span>
<span style="color: #ff7f24; font-style: italic;"> * Software Foundation, either version 3 of the License, or (at your option) any</span>
<span style="color: #ff7f24; font-style: italic;"> * later version.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> * This program is distributed in the hope that it will be useful, but WITHOUT</span>
<span style="color: #ff7f24; font-style: italic;"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
<span style="color: #ff7f24; font-style: italic;"> * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more</span>
<span style="color: #ff7f24; font-style: italic;"> * details.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> * You should have received a copy of the GNU Lesser General Public License</span>
<span style="color: #ff7f24; font-style: italic;"> * along with this program.  If not, see &lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">------------------------------------------------------------------ :Libraries:</span>
<span style="color: #fa8072;">//                      </span><span style="color: #ff7f24; font-style: italic;">_    _ _                 _</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |  (_) |__ _ _ __ _ _ _(_)___ ___</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |__| | '_ \ '_/ _` | '_| / -_|_-&lt;</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">|____|_|_.__/_| \__,_|_| |_\___/__/</span>
<span style="color: #fa8072;">//</span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">"mainwindow.h"</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">"ui_mainwindow.h"</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;QPushButton&gt;</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Sets up the Main Interface.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">MainWindow</span>(<span style="color: #63b8ff;">QWidget</span> *<span style="color: #7fffd4;">parent</span>) :
    QMainWindow(parent),
    ui(<span style="color: #00ffff;">new</span> <span style="color: #8470ff; font-weight: bold;">Ui</span>::<span style="color: #63b8ff;">MainWindow</span>)
{
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Set up User Interface</span>
    ui-&gt;setupUi(<span style="color: #00ffff;">this</span>);
    <span style="color: #00ffff;">this</span>-&gt;DeleteButtonInit();
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Window deconstructor.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #8470ff; font-weight: bold;">MainWindow</span>::~MainWindow()
{
    <span style="color: #00ffff;">delete</span> ui;
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Initializes the on default "off state" buton.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">DeleteButtonInit</span>()
{
    <span style="color: #00ffff;">this</span>-&gt;deleteButton = <span style="color: #00ffff;">new</span> <span style="color: #63b8ff;">QPushButton</span>(<span style="color: #00ffff;">this</span>);
    <span style="color: #00ffff;">this</span>-&gt;deleteButton-&gt;setStyleSheet(<span style="color: #ffc1c1;">"background-color: black;"</span>
                                      <span style="color: #ffc1c1;">"selection-background-color: black;"</span>);
    <span style="color: #00ffff;">this</span>-&gt;deleteButton-&gt;setFixedSize(500,300);
    connect(deleteButton, <span style="color: #63b8ff;">SIGNAL</span>(<span style="color: #7fffd4;">pressed</span>()), <span style="color: #00ffff;">this</span>, <span style="color: #63b8ff;">SLOT</span>(<span style="color: #7fffd4;">DeleteButtonHide</span>()));
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Hides the "off state" button.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">DeleteButtonHide</span>()
{
    <span style="color: #00ffff;">this</span>-&gt;deleteButton-&gt;setVisible(<span style="color: #8470ff; font-weight: bold;">false</span>);
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Makes the screen go blank (turns the lights off).</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_offButton_clicked</span>()
{
    <span style="color: #00ffff;">this</span>-&gt;deleteButton-&gt;setVisible(<span style="color: #8470ff; font-weight: bold;">true</span>);
}

<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">void MainWindow::on_label_3_linkActivated()</span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">{</span>
<span style="color: #fa8072;">//     </span><span style="color: #ff7f24; font-style: italic;">ui-&gt;tabWidget-&gt;setCurrentIndex(0);</span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">}</span>
</pre>

</div>

</div>

<div id="outline-container-7-1-3" class="outline-4">
<h4 id="sec-7-1-3">MainWindow.h</h4>
<div class="outline-text-4" id="text-7-1-3">




<pre class="src src-cpp"><span style="color: #6495ed; font-style: italic;">#if</span><span style="color: #6495ed; font-style: italic;">n</span><span style="color: #6495ed; font-style: italic;">def</span> MAINWINDOW_H
<span style="color: #6495ed; font-style: italic;">#define</span> <span style="color: #7fffd4;">MAINWINDOW_H</span>

<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;QMainWindow&gt;</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;QPushButton&gt;</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;QProxyStyle&gt;</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;QScrollBar&gt;</span>

<span style="color: #00ffff;">namespace</span> <span style="color: #8470ff; font-weight: bold;">Ui</span> {
    <span style="color: #00ffff;">class</span> <span style="color: #63b8ff;">MainWindow</span>;
}

<span style="color: #00ffff;">class</span> <span style="color: #63b8ff;">MainWindow</span> : <span style="color: #00ffff;">public</span> <span style="color: #63b8ff;">QMainWindow</span>
{


    Q_OBJECT

        <span style="color: #00ffff;">public</span>:
    <span style="color: #00ffff;">explicit</span> MainWindow(<span style="color: #63b8ff;">QWidget</span> *<span style="color: #7fffd4;">parent</span> = 0);
    ~<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">MainWindow</span>();

    <span style="color: #00ffff;">private</span> <span style="color: #00ffff;">slots</span>:
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">DeleteButtonInit</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">DeleteButtonHide</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_offButton_clicked</span>();

    <span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">void on_label_3_linkActivated();</span>

<span style="color: #00ffff;">private</span>:
    <span style="color: #8470ff; font-weight: bold;">Ui</span>::MainWindow *ui;
    QPushButton *deleteButton;
};


<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Override style for better Touchscreen handling</span>
<span style="color: #00ffff;">class</span> <span style="color: #63b8ff;">MyProxyStyle</span> : <span style="color: #00ffff;">public</span> <span style="color: #63b8ff;">QProxyStyle</span>
{
  <span style="color: #00ffff;">public</span>:
    <span style="color: #63b8ff;">int</span> pixelMetric ( <span style="color: #63b8ff;">PixelMetric</span> <span style="color: #7fffd4;">metric</span>, <span style="color: #00ffff;">const</span> <span style="color: #63b8ff;">QStyleOption</span> * <span style="color: #7fffd4;">option</span> = 0,
                      <span style="color: #00ffff;">const</span> <span style="color: #63b8ff;">QWidget</span> * <span style="color: #7fffd4;">widget</span> = 0 ) <span style="color: #00ffff;">const</span>
    {
        <span style="color: #00ffff;">switch</span>(metric) {
          <span style="color: #00ffff;">case</span> PM_SliderControlThickness  : <span style="color: #00ffff;">return</span> 50;
          <span style="color: #00ffff;">default</span>                         : <span style="color: #00ffff;">return</span>
                (<span style="color: #8470ff; font-weight: bold;">QProxyStyle</span>::pixelMetric(metric,option,widget));
        }
    }

};




<span style="color: #6495ed; font-style: italic;">#endif</span> <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">MAINWINDOW_H</span>
</pre>

</div>

</div>

<div id="outline-container-7-1-4" class="outline-4">
<h4 id="sec-7-1-4">moc_mainwindow.cpp</h4>
<div class="outline-text-4" id="text-7-1-4">

<p>CANNOT INCLUDE FILE ../src/vital_vio/vital_vio/moc_mainwindow.cpp
</p></div>

</div>

<div id="outline-container-7-1-5" class="outline-4">
<h4 id="sec-7-1-5">ui_mainwindow.h</h4>
<div class="outline-text-4" id="text-7-1-5">

<p>CANNOT INCLUDE FILE ../src/vital_vio/vital_vio/ui_mainwindow.h
</p></div>

</div>

<div id="outline-container-7-1-6" class="outline-4">
<h4 id="sec-7-1-6">mainwindow.ui</h4>
<div class="outline-text-4" id="text-7-1-6">

<p>CANNOT INCLUDE FILE ../src/vital_vio/vital_vio/!mainwindow.ui
</p></div>
</div>

</div>

<div id="outline-container-7-2" class="outline-3">
<h3 id="sec-7-2">Burgler</h3>
<div class="outline-text-3" id="text-7-2">


</div>

<div id="outline-container-7-2-1" class="outline-4">
<h4 id="sec-7-2-1">Source</h4>
<div class="outline-text-4" id="text-7-2-1">

<ul>
<li id="sec-7-2-1-1">MainWindow.cpp<br/>



<pre class="src src-cpp"><span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @file mainwindow.cpp</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief A basic 5 channel controller program.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> *  The program allows a person to turn a light on and off, as well as control 5</span>
<span style="color: #ff7f24; font-style: italic;"> *  channels.</span>
<span style="color: #ff7f24; font-style: italic;"> *  </span>
<span style="color: #ff7f24; font-style: italic;"> *  @title Burgler</span>
<span style="color: #ff7f24; font-style: italic;"> *  @author Nicholas Guthrie</span>
<span style="color: #ff7f24; font-style: italic;"> *  @web http//nickguthrie.com</span>
<span style="color: #ff7f24; font-style: italic;"> *  @created July 23, 2013</span>
<span style="color: #ff7f24; font-style: italic;"> * </span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> * This program is free software: you can redistribute it and/or modify it under</span>
<span style="color: #ff7f24; font-style: italic;"> * the terms of the GNU General Public License as published by the Free Software</span>
<span style="color: #ff7f24; font-style: italic;"> * Foundation, either version 3 of the License, or (at your option) any later</span>
<span style="color: #ff7f24; font-style: italic;"> * version.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> * This program is distributed in the hope that it will be useful, but WITHOUT</span>
<span style="color: #ff7f24; font-style: italic;"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
<span style="color: #ff7f24; font-style: italic;"> * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more</span>
<span style="color: #ff7f24; font-style: italic;"> * details.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> * You should have received a copy of the GNU General Public License along with</span>
<span style="color: #ff7f24; font-style: italic;"> * this program.  If not, see &lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">------------------------------------------------------------------ :Libraries:</span>
<span style="color: #fa8072;">//                      </span><span style="color: #ff7f24; font-style: italic;">_    _ _                 _        </span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |  (_) |__ _ _ __ _ _ _(_)___ ___</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |__| | '_ \ '_/ _` | '_| / -_|_-&lt;</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">|____|_|_.__/_| \__,_|_| |_\___/__/</span>
<span style="color: #fa8072;">//                                                        </span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">"mainwindow.h"</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">"channel.h"</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">"ui_mainwindow.h"</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;QTimer&gt;</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;string&gt;</span>

<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">--------------------------------------------------------------------- :Global:</span>
<span style="color: #fa8072;">//                            </span><span style="color: #ff7f24; font-style: italic;">___ _     _          _ </span>
<span style="color: #fa8072;">//                           </span><span style="color: #ff7f24; font-style: italic;">/ __| |___| |__  __ _| |</span>
<span style="color: #fa8072;">//                          </span><span style="color: #ff7f24; font-style: italic;">| (_ | / _ \ '_ \/ _` | |</span>
<span style="color: #fa8072;">//                           </span><span style="color: #ff7f24; font-style: italic;">\___|_\___/_.__/\__,_|_|</span>
<span style="color: #fa8072;">//                                                   </span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #6495ed; font-style: italic;">#define</span> <span style="color: #7fffd4;">INCRAMENT</span> 10
<span style="color: #6495ed; font-style: italic;">#define</span> <span style="color: #7fffd4;">NUM_CHAN</span> 5

<span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">PUSHED</span>;
<span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">mode</span>;
channel * cholder;

<span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">MainWindow</span>(<span style="color: #63b8ff;">QWidget</span> *<span style="color: #7fffd4;">parent</span>) :
    QMainWindow(parent),
    ui(<span style="color: #00ffff;">new</span> <span style="color: #8470ff; font-weight: bold;">Ui</span>::<span style="color: #63b8ff;">MainWindow</span>)
{
    PUSHED = 0;
    ui-&gt;setupUi(<span style="color: #00ffff;">this</span>); 

    <span style="color: #fa8072;">////////////////////////////////////////</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Sliders - Connect sliders to LCD</span>
    <span style="color: #fa8072;">////////////////////////////////////////</span>
    <span style="color: #fa8072;">/*</span><span style="color: #ff7f24; font-style: italic;">connect(ui-&gt;verticalSlider,SIGNAL(valueChanged(int)),</span>
<span style="color: #ff7f24; font-style: italic;">      ui-&gt;progressBar,SLOT(setValue(int))); */</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">connect(ui-&gt;hslider_01, SIGNAL(valueChanged(int)),</span>
    <span style="color: #fa8072;">//      </span><span style="color: #ff7f24; font-style: italic;">ui-&gt;lcd_01, SLOT(display(int)));</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">connect(ui-&gt;hslider_02, SIGNAL(valueChanged(int)),</span>
    <span style="color: #fa8072;">//      </span><span style="color: #ff7f24; font-style: italic;">ui-&gt;lcd_02, SLOT(display(int)));</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">connect(ui-&gt;hslider_03, SIGNAL(valueChanged(int)),</span>
    <span style="color: #fa8072;">//      </span><span style="color: #ff7f24; font-style: italic;">ui-&gt;lcd_03, SLOT(display(int)));</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">connect(ui-&gt;hslider_04, SIGNAL(valueChanged(int)),</span>
    <span style="color: #fa8072;">//      </span><span style="color: #ff7f24; font-style: italic;">ui-&gt;lcd_04, SLOT(display(int)));</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">connect(ui-&gt;hslider_05, SIGNAL(valueChanged(int)),</span>
    <span style="color: #fa8072;">//      </span><span style="color: #ff7f24; font-style: italic;">ui-&gt;lcd_05, SLOT(display(int)));</span>

    <span style="color: #fa8072;">////////////////////////////////////////</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Channels</span>
    <span style="color: #fa8072;">////////////////////////////////////////</span>
    cholder = <span style="color: #00ffff;">new</span> <span style="color: #63b8ff;">channel</span>[NUM_CHAN];

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Testing</span>
    <span style="color: #00ffff;">for</span>( <span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">i</span>=0; i&lt;NUM_CHAN; i++ )
    {
        mode = i;
        cholder[i].set_value(i+50);
        UpdateLCD();
    }


    <span style="color: #fa8072;">////////////////////////////////////////</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Button Incramenting</span>
    <span style="color: #fa8072;">////////////////////////////////////////</span>
    number = 0;
    timerTimeout = 0;
    timer = <span style="color: #00ffff;">new</span> <span style="color: #63b8ff;">QTimer</span>(<span style="color: #00ffff;">this</span>);

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Incrament Button Connections</span>
    connect(timer, <span style="color: #63b8ff;">SIGNAL</span>(<span style="color: #7fffd4;">timeout</span>()), <span style="color: #00ffff;">this</span>, <span style="color: #63b8ff;">SLOT</span>(<span style="color: #7fffd4;">doIncrement</span>()));
    connect(ui-&gt;pb_value_incrament, <span style="color: #63b8ff;">SIGNAL</span>(<span style="color: #7fffd4;">pressed</span>()), <span style="color: #00ffff;">this</span>, <span style="color: #63b8ff;">SLOT</span>(<span style="color: #7fffd4;">buttonPressed</span>()));
    connect(ui-&gt;pb_value_incrament, <span style="color: #63b8ff;">SIGNAL</span>(<span style="color: #7fffd4;">released</span>()), <span style="color: #00ffff;">this</span>, <span style="color: #63b8ff;">SLOT</span>(<span style="color: #7fffd4;">buttonReleased</span>()));
    connect(ui-&gt;pb_value_decrament, <span style="color: #63b8ff;">SIGNAL</span>(<span style="color: #7fffd4;">pressed</span>()), <span style="color: #00ffff;">this</span>, <span style="color: #63b8ff;">SLOT</span>(<span style="color: #7fffd4;">buttonPressed</span>()));
    connect(ui-&gt;pb_value_decrament, <span style="color: #63b8ff;">SIGNAL</span>(<span style="color: #7fffd4;">released</span>()), <span style="color: #00ffff;">this</span>, <span style="color: #63b8ff;">SLOT</span>(<span style="color: #7fffd4;">buttonReleased</span>()));
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Window deconstructor.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #8470ff; font-weight: bold;">MainWindow</span>::~MainWindow()
{
    <span style="color: #00ffff;">delete</span> ui;
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Updates the LCD of the current mode set.  This function should be</span>
<span style="color: #ff7f24; font-style: italic;"> *  called every time a channel value is modified with the appropriate mode.</span>
<span style="color: #ff7f24; font-style: italic;"> *  @warning Does not verify the mode is valid.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">wvoid</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">UpdateLCD</span>()
{
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Update Slider</span>
    ui-&gt;channelSlider-&gt;setRange(cholder[mode].get_min(), cholder[mode].get_max());
    ui-&gt;channelSlider-&gt;setValue(cholder[mode].get_value());

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Update LCD Screens</span>
    <span style="color: #00ffff;">switch</span> (mode)
    {
    <span style="color: #00ffff;">case</span> 0:
        ui-&gt;lcd_0-&gt;display(cholder[0].get_value());
        <span style="color: #00ffff;">break</span>;
    <span style="color: #00ffff;">case</span> 1:
        ui-&gt;lcd_1-&gt;display(cholder[1].get_value());
        <span style="color: #00ffff;">break</span>;
    <span style="color: #00ffff;">case</span> 2:
        ui-&gt;lcd_2-&gt;display(cholder[2].get_value());
        <span style="color: #00ffff;">break</span>;
    <span style="color: #00ffff;">case</span> 3:
        ui-&gt;lcd_3-&gt;display(cholder[3].get_value());
        <span style="color: #00ffff;">break</span>;
    <span style="color: #00ffff;">case</span> 4:
        ui-&gt;lcd_4-&gt;display(cholder[4].get_value());
        <span style="color: #00ffff;">break</span>;
    <span style="color: #00ffff;">default</span>:
        <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">ERROR</span>
        <span style="color: #00ffff;">break</span>;
    }    
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Modifies the mode for button 0.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_0_clicked</span>()
{
    mode = 0;
    ui-&gt;mode_label-&gt;setText(<span style="color: #ffc1c1;">"Channel 0"</span>);
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Modifies the mode for button 1.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_1_clicked</span>()
{
    mode = 1;
    ui-&gt;mode_label-&gt;setText(<span style="color: #ffc1c1;">"Channel 1"</span>);
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Modifies the mode for button 2.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_2_clicked</span>()
{
    mode = 2;
    ui-&gt;mode_label-&gt;setText(<span style="color: #ffc1c1;">"Channel 2"</span>);
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Modifies the mode for button 3.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_3_clicked</span>()
{
    mode = 3;
    ui-&gt;mode_label-&gt;setText(<span style="color: #ffc1c1;">"Channel 3"</span>);
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Modifies the mode for button 4.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_4_clicked</span>()
{
    mode = 4;
    ui-&gt;mode_label-&gt;setText(<span style="color: #ffc1c1;">"Channel 4"</span>);
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Sets a channel to its minimum value.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_off_clicked</span>()
{
    cholder[mode].set_value(cholder[mode].get_min());
    UpdateLCD();
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Sets a channel to its maximum</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_full_clicked</span>()
{
    cholder[mode].set_value(cholder[mode].get_max());
    UpdateLCD();
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Sets a channel to half of its value (max - min)/2.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_half_clicked</span>()
{
    <span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">val</span> = (cholder[mode].get_max()
               - cholder[mode].get_min()) / 2;
    cholder[mode].set_value(val);
    UpdateLCD();
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Watches if the slider value changes and modifies the channel.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_channelSlider_valueChanged</span>(<span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">value</span>)
{
    <span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">val</span> = ui-&gt;channelSlider-&gt;value();
    cholder[mode].set_value(val);
    UpdateLCD();
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Incraments the channel while the incrament button is held down.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_incrament_pressed</span>()
{
    incrament = <span style="color: #8470ff; font-weight: bold;">true</span>;
    timerTimeout = 2000;
    doIncrement();
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Decraments the channel while the incrament button is held down.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_decrament_pressed</span>()
{
    incrament = <span style="color: #8470ff; font-weight: bold;">false</span>;
    timerTimeout = 2000;
    doIncrement();

}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief A timer function for the incrament/decrament buttons.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">buttonPressed</span>()
{
    timerTimeout = 2000;
    doIncrement();
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief A timer function for the incrament/decrament buttons.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">buttonReleased</span>()
{
    timer-&gt;stop();
}
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Timer function that modifies the values for incrament and decrament.</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">void</span> <span style="color: #8470ff; font-weight: bold;">MainWindow</span>::<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">doIncrement</span>()
{
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">If the incrament button, incrament channel</span>
    <span style="color: #00ffff;">if</span>( incrament )
        cholder[mode].incrament();
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">If the decrament button, decrament channel</span>
    <span style="color: #00ffff;">else</span>
        cholder[mode].decrament();
    <span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">ui-&gt;label-&gt;setText(QString("Value: %1").arg(number));</span>
    <span style="color: #00ffff;">if</span>( timerTimeout &gt; 10 )
        timerTimeout = timerTimeout / 4;
    timer-&gt;start(timerTimeout);
    UpdateLCD();
}
</pre>

</li>
</ul>
<ul>
<li id="sec-7-2-1-2">MainWindow.h<br/>



<pre class="src src-cpp"><span style="color: #6495ed; font-style: italic;">#if</span><span style="color: #6495ed; font-style: italic;">n</span><span style="color: #6495ed; font-style: italic;">def</span> MAINWINDOW_H
<span style="color: #6495ed; font-style: italic;">#define</span> <span style="color: #7fffd4;">MAINWINDOW_H</span>

<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;QMainWindow&gt;</span>

<span style="color: #00ffff;">namespace</span> <span style="color: #8470ff; font-weight: bold;">Ui</span> {
<span style="color: #00ffff;">class</span> <span style="color: #63b8ff;">MainWindow</span>;
}

<span style="color: #00ffff;">class</span> <span style="color: #63b8ff;">MainWindow</span> : <span style="color: #00ffff;">public</span> <span style="color: #63b8ff;">QMainWindow</span>
{
    Q_OBJECT

<span style="color: #00ffff;">public</span>:
    <span style="color: #00ffff;">explicit</span> MainWindow(<span style="color: #63b8ff;">QWidget</span> *<span style="color: #7fffd4;">parent</span> = 0);
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">UpdateLCD</span>();
    ~<span style="color: #00fa9a; font-size: 110%; font-weight: bold;">MainWindow</span>();

<span style="color: #00ffff;">private</span> <span style="color: #00ffff;">slots</span>:
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_0_clicked</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_1_clicked</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_2_clicked</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_3_clicked</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_cbutton_4_clicked</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_off_clicked</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_full_clicked</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_half_clicked</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_channelSlider_valueChanged</span>(<span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">value</span>);
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_incrament_pressed</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">on_pb_value_decrament_pressed</span>();

<span style="color: #00ffff;">protected</span> <span style="color: #00ffff;">slots</span>:
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">buttonPressed</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">buttonReleased</span>();
    <span style="color: #63b8ff;">void</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">doIncrement</span>();


<span style="color: #00ffff;">private</span>:
    <span style="color: #8470ff; font-weight: bold;">Ui</span>::MainWindow *ui;

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Button Incramenter</span>
    QTimer *timer;
    <span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">timerTimeout</span>;
    <span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">number</span>;
    <span style="color: #63b8ff;">bool</span> <span style="color: #7fffd4;">incrament</span>;
};

<span style="color: #6495ed; font-style: italic;">#endif</span> <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">MAINWINDOW_H</span>
</pre>

</li>
</ul>
<ul>
<li id="sec-7-2-1-3">moc_mainwindow.cpp<br/>
CANNOT INCLUDE FILE ../src/testing/Burgler/moc_mainwindow.cpp
</li>
</ul>
<ul>
<li id="sec-7-2-1-4">ui_mainwindow.h<br/>
CANNOT INCLUDE FILE ../src/testing/Burgler/ui_mainwindow.h
</li>
</ul>
<ul>
<li id="sec-7-2-1-5">mainwindow.ui<br/>



<pre class="src src-txt">&lt;?xml version=<span style="color: #ffc1c1;">"1.0"</span> encoding=<span style="color: #ffc1c1;">"UTF-8"</span>?&gt;
&lt;ui version=<span style="color: #ffc1c1;">"4.0"</span>&gt;
 &lt;class&gt;MainWindow&lt;/class&gt;
 &lt;widget class=<span style="color: #ffc1c1;">"QMainWindow"</span> name=<span style="color: #ffc1c1;">"MainWindow"</span>&gt;
  &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
   &lt;rect&gt;
    &lt;x&gt;0&lt;/x&gt;
    &lt;y&gt;0&lt;/y&gt;
    &lt;width&gt;480&lt;/width&gt;
    &lt;height&gt;272&lt;/height&gt;
   &lt;/rect&gt;
  &lt;/property&gt;
  &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
   &lt;size&gt;
    &lt;width&gt;480&lt;/width&gt;
    &lt;height&gt;272&lt;/height&gt;
   &lt;/size&gt;
  &lt;/property&gt;
  &lt;property name=<span style="color: #ffc1c1;">"maximumSize"</span>&gt;
   &lt;size&gt;
    &lt;width&gt;480&lt;/width&gt;
    &lt;height&gt;272&lt;/height&gt;
   &lt;/size&gt;
  &lt;/property&gt;
  &lt;property name=<span style="color: #ffc1c1;">"windowTitle"</span>&gt;
   &lt;string&gt;MainWindow&lt;/string&gt;
  &lt;/property&gt;
  &lt;widget class=<span style="color: #ffc1c1;">"QWidget"</span> name=<span style="color: #ffc1c1;">"centralWidget"</span>&gt;
   &lt;widget class=<span style="color: #ffc1c1;">"QLabel"</span> name=<span style="color: #ffc1c1;">"label"</span>&gt;
    &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
     &lt;rect&gt;
      &lt;x&gt;10&lt;/x&gt;
      &lt;y&gt;10&lt;/y&gt;
      &lt;width&gt;371&lt;/width&gt;
      &lt;height&gt;41&lt;/height&gt;
     &lt;/rect&gt;
    &lt;/property&gt;
    &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
     &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;image: url(:/img/rcos.png);&lt;/string&gt;
    &lt;/property&gt;
    &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
     &lt;string/&gt;
    &lt;/property&gt;
   &lt;/widget&gt;
   &lt;widget class=<span style="color: #ffc1c1;">"QTabWidget"</span> name=<span style="color: #ffc1c1;">"tabWidget"</span>&gt;
    &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
     &lt;rect&gt;
      &lt;x&gt;0&lt;/x&gt;
      &lt;y&gt;60&lt;/y&gt;
      &lt;width&gt;481&lt;/width&gt;
      &lt;height&gt;251&lt;/height&gt;
     &lt;/rect&gt;
    &lt;/property&gt;
    &lt;property name=<span style="color: #ffc1c1;">"focusPolicy"</span>&gt;
     &lt;enum&gt;Qt::StrongFocus&lt;/enum&gt;
    &lt;/property&gt;
    &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
     &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(51, 51, 51);&lt;/string&gt;
    &lt;/property&gt;
    &lt;property name=<span style="color: #ffc1c1;">"tabPosition"</span>&gt;
     &lt;enum&gt;QTabWidget::West&lt;/enum&gt;
    &lt;/property&gt;
    &lt;property name=<span style="color: #ffc1c1;">"tabShape"</span>&gt;
     &lt;enum&gt;QTabWidget::Rounded&lt;/enum&gt;
    &lt;/property&gt;
    &lt;property name=<span style="color: #ffc1c1;">"currentIndex"</span>&gt;
     &lt;number&gt;0&lt;/number&gt;
    &lt;/property&gt;
    &lt;property name=<span style="color: #ffc1c1;">"iconSize"</span>&gt;
     &lt;size&gt;
      &lt;width&gt;42&lt;/width&gt;
      &lt;height&gt;50&lt;/height&gt;
     &lt;/size&gt;
    &lt;/property&gt;
    &lt;widget class=<span style="color: #ffc1c1;">"QWidget"</span> name=<span style="color: #ffc1c1;">"tab"</span>&gt;
     &lt;attribute name=<span style="color: #ffc1c1;">"icon"</span>&gt;
      &lt;iconset resource=<span style="color: #ffc1c1;">"Loot.qrc"</span>&gt;
       &lt;normaloff&gt;:/img/gpl_logo_sideways_colored.png&lt;/normaloff&gt;:/img/gpl_logo_sideways_colored.png&lt;/iconset&gt;
     &lt;/attribute&gt;
     &lt;attribute name=<span style="color: #ffc1c1;">"title"</span>&gt;
      &lt;string/&gt;
     &lt;/attribute&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"pb_down"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;20&lt;/x&gt;
        &lt;y&gt;60&lt;/y&gt;
        &lt;width&gt;171&lt;/width&gt;
        &lt;height&gt;91&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"font"</span>&gt;
       &lt;font&gt;
        &lt;family&gt;Abyssinica SIL&lt;/family&gt;
        &lt;pointsize&gt;40&lt;/pointsize&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
       &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;color: rgb(255, 255, 255);
background-color: rgb(148, 3, 0);
alternate-background-color: rgb(148, 3, 0);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
       &lt;string&gt;OFF&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"pb_up"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;210&lt;/x&gt;
        &lt;y&gt;60&lt;/y&gt;
        &lt;width&gt;171&lt;/width&gt;
        &lt;height&gt;91&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
       &lt;size&gt;
        &lt;width&gt;171&lt;/width&gt;
        &lt;height&gt;27&lt;/height&gt;
       &lt;/size&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"font"</span>&gt;
       &lt;font&gt;
        &lt;family&gt;Abyssinica SIL&lt;/family&gt;
        &lt;pointsize&gt;40&lt;/pointsize&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
       &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(84, 152, 91);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
       &lt;string&gt;ON&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
    &lt;/widget&gt;
    &lt;widget class=<span style="color: #ffc1c1;">"QWidget"</span> name=<span style="color: #ffc1c1;">"tab_3"</span>&gt;
     &lt;attribute name=<span style="color: #ffc1c1;">"icon"</span>&gt;
      &lt;iconset resource=<span style="color: #ffc1c1;">"Loot.qrc"</span>&gt;
       &lt;normaloff&gt;:/img/gpl_logo_sideways_red.png&lt;/normaloff&gt;:/img/gpl_logo_sideways_red.png&lt;/iconset&gt;
     &lt;/attribute&gt;
     &lt;attribute name=<span style="color: #ffc1c1;">"title"</span>&gt;
      &lt;string/&gt;
     &lt;/attribute&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QFrame"</span> name=<span style="color: #ffc1c1;">"frame"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;0&lt;/x&gt;
        &lt;y&gt;0&lt;/y&gt;
        &lt;width&gt;191&lt;/width&gt;
        &lt;height&gt;211&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"frameShape"</span>&gt;
       &lt;enum&gt;QFrame::StyledPanel&lt;/enum&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"frameShadow"</span>&gt;
       &lt;enum&gt;QFrame::Raised&lt;/enum&gt;
      &lt;/property&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"cbutton_0"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;0&lt;/x&gt;
         &lt;y&gt;0&lt;/y&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"maximumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
        &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(255, 0, 0);&lt;/string&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
        &lt;string&gt;channel 0&lt;/string&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"cbutton_1"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;0&lt;/x&gt;
         &lt;y&gt;40&lt;/y&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"maximumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
        &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(255, 170, 0);&lt;/string&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
        &lt;string&gt;channel 1&lt;/string&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"cbutton_2"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;0&lt;/x&gt;
         &lt;y&gt;80&lt;/y&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"maximumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
        &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(85, 255, 0);&lt;/string&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
        &lt;string&gt;channel 2&lt;/string&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"cbutton_3"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;0&lt;/x&gt;
         &lt;y&gt;120&lt;/y&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"maximumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
        &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(0, 170, 255);&lt;/string&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
        &lt;string&gt;channel 3&lt;/string&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"cbutton_4"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;0&lt;/x&gt;
         &lt;y&gt;160&lt;/y&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;100&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"maximumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
        &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(85, 85, 255);&lt;/string&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
        &lt;string&gt;channel 4&lt;/string&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QLCDNumber"</span> name=<span style="color: #ffc1c1;">"lcd_0"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;100&lt;/x&gt;
         &lt;y&gt;0&lt;/y&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QLCDNumber"</span> name=<span style="color: #ffc1c1;">"lcd_1"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;100&lt;/x&gt;
         &lt;y&gt;40&lt;/y&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QLCDNumber"</span> name=<span style="color: #ffc1c1;">"lcd_2"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;100&lt;/x&gt;
         &lt;y&gt;80&lt;/y&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QLCDNumber"</span> name=<span style="color: #ffc1c1;">"lcd_3"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;100&lt;/x&gt;
         &lt;y&gt;120&lt;/y&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
      &lt;widget class=<span style="color: #ffc1c1;">"QLCDNumber"</span> name=<span style="color: #ffc1c1;">"lcd_4"</span>&gt;
       &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
        &lt;rect&gt;
         &lt;x&gt;100&lt;/x&gt;
         &lt;y&gt;160&lt;/y&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/rect&gt;
       &lt;/property&gt;
       &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
        &lt;size&gt;
         &lt;width&gt;80&lt;/width&gt;
         &lt;height&gt;40&lt;/height&gt;
        &lt;/size&gt;
       &lt;/property&gt;
      &lt;/widget&gt;
     &lt;/widget&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"pb_value_full"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;340&lt;/x&gt;
        &lt;y&gt;50&lt;/y&gt;
        &lt;width&gt;60&lt;/width&gt;
        &lt;height&gt;51&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
       &lt;size&gt;
        &lt;width&gt;60&lt;/width&gt;
        &lt;height&gt;27&lt;/height&gt;
       &lt;/size&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"font"</span>&gt;
       &lt;font&gt;
        &lt;family&gt;Abyssinica SIL&lt;/family&gt;
        &lt;pointsize&gt;20&lt;/pointsize&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
       &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(84, 152, 91);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
       &lt;string&gt;Full&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"pb_value_off"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;200&lt;/x&gt;
        &lt;y&gt;50&lt;/y&gt;
        &lt;width&gt;60&lt;/width&gt;
        &lt;height&gt;51&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
       &lt;size&gt;
        &lt;width&gt;60&lt;/width&gt;
        &lt;height&gt;27&lt;/height&gt;
       &lt;/size&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"font"</span>&gt;
       &lt;font&gt;
        &lt;family&gt;Abyssinica SIL&lt;/family&gt;
        &lt;pointsize&gt;20&lt;/pointsize&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
       &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(148, 3, 0);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
       &lt;string&gt;Off&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"pb_value_decrament"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;200&lt;/x&gt;
        &lt;y&gt;110&lt;/y&gt;
        &lt;width&gt;91&lt;/width&gt;
        &lt;height&gt;51&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
       &lt;size&gt;
        &lt;width&gt;80&lt;/width&gt;
        &lt;height&gt;27&lt;/height&gt;
       &lt;/size&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"font"</span>&gt;
       &lt;font&gt;
        &lt;family&gt;Symbol&lt;/family&gt;
        &lt;pointsize&gt;36&lt;/pointsize&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
       &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(148, 3, 0);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
       &lt;string&gt;-&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"pb_value_incrament"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;300&lt;/x&gt;
        &lt;y&gt;110&lt;/y&gt;
        &lt;width&gt;101&lt;/width&gt;
        &lt;height&gt;51&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
       &lt;size&gt;
        &lt;width&gt;80&lt;/width&gt;
        &lt;height&gt;27&lt;/height&gt;
       &lt;/size&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"font"</span>&gt;
       &lt;font&gt;
        &lt;family&gt;Symbol&lt;/family&gt;
        &lt;pointsize&gt;36&lt;/pointsize&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
       &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(84, 152, 91);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
       &lt;string&gt;+&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QSlider"</span> name=<span style="color: #ffc1c1;">"channelSlider"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;200&lt;/x&gt;
        &lt;y&gt;180&lt;/y&gt;
        &lt;width&gt;201&lt;/width&gt;
        &lt;height&gt;21&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"focusPolicy"</span>&gt;
       &lt;enum&gt;Qt::ClickFocus&lt;/enum&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
       &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(245, 224, 176, 255), stop:0.09 rgba(246, 189, 237, 255), stop:0.14 rgba(194, 207, 246, 255), stop:0.19 rgba(184, 160, 168, 255), stop:0.25 rgba(171, 186, 248, 255), stop:0.32 rgba(243, 248, 224, 255), stop:0.385 rgba(249, 162, 183, 255), stop:0.47 rgba(100, 115, 124, 255), stop:0.58 rgba(251, 205, 202, 255), stop:0.65 rgba(170, 128, 185, 255), stop:0.75 rgba(252, 222, 204, 255), stop:0.805 rgba(206, 122, 218, 255), stop:0.86 rgba(254, 223, 175, 255), stop:0.91 rgba(254, 236, 244, 255), stop:1 rgba(255, 191, 221, 255));&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"orientation"</span>&gt;
       &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QLabel"</span> name=<span style="color: #ffc1c1;">"mode_label"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;200&lt;/x&gt;
        &lt;y&gt;10&lt;/y&gt;
        &lt;width&gt;201&lt;/width&gt;
        &lt;height&gt;31&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"font"</span>&gt;
       &lt;font&gt;
        &lt;family&gt;Abyssinica SIL&lt;/family&gt;
        &lt;pointsize&gt;18&lt;/pointsize&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
       &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;color: rgb(255, 255, 255);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
       &lt;string&gt;Select Channel&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
     &lt;widget class=<span style="color: #ffc1c1;">"QPushButton"</span> name=<span style="color: #ffc1c1;">"pb_value_half"</span>&gt;
      &lt;property name=<span style="color: #ffc1c1;">"geometry"</span>&gt;
       &lt;rect&gt;
        &lt;x&gt;270&lt;/x&gt;
        &lt;y&gt;50&lt;/y&gt;
        &lt;width&gt;60&lt;/width&gt;
        &lt;height&gt;51&lt;/height&gt;
       &lt;/rect&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"minimumSize"</span>&gt;
       &lt;size&gt;
        &lt;width&gt;60&lt;/width&gt;
        &lt;height&gt;27&lt;/height&gt;
       &lt;/size&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"font"</span>&gt;
       &lt;font&gt;
        &lt;family&gt;Abyssinica SIL&lt;/family&gt;
        &lt;pointsize&gt;20&lt;/pointsize&gt;
       &lt;/font&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"styleSheet"</span>&gt;
       &lt;string notr=<span style="color: #ffc1c1;">"true"</span>&gt;background-color: rgb(255, 85, 0);&lt;/string&gt;
      &lt;/property&gt;
      &lt;property name=<span style="color: #ffc1c1;">"text"</span>&gt;
       &lt;string&gt;1/2&lt;/string&gt;
      &lt;/property&gt;
     &lt;/widget&gt;
    &lt;/widget&gt;
    &lt;widget class=<span style="color: #ffc1c1;">"QWidget"</span> name=<span style="color: #ffc1c1;">"tab_2"</span>&gt;
     &lt;attribute name=<span style="color: #ffc1c1;">"icon"</span>&gt;
      &lt;iconset resource=<span style="color: #ffc1c1;">"Loot.qrc"</span>&gt;
       &lt;normaloff&gt;:/img/gpl_logo_sideways_blue.png&lt;/normaloff&gt;:/img/gpl_logo_sideways_blue.png&lt;/iconset&gt;
     &lt;/attribute&gt;
     &lt;attribute name=<span style="color: #ffc1c1;">"title"</span>&gt;
      &lt;string/&gt;
     &lt;/attribute&gt;
    &lt;/widget&gt;
   &lt;/widget&gt;
  &lt;/widget&gt;
 &lt;/widget&gt;
 &lt;layoutdefault spacing=<span style="color: #ffc1c1;">"6"</span> margin=<span style="color: #ffc1c1;">"11"</span>/&gt;
 &lt;resources&gt;
  &lt;include location=<span style="color: #ffc1c1;">"Loot.qrc"</span>/&gt;
 &lt;/resources&gt;
 &lt;connections/&gt;
&lt;/ui&gt;
</pre>

</li>
</ul>
</div>

</div>

<div id="outline-container-7-2-2" class="outline-4">
<h4 id="sec-7-2-2">Notes</h4>
<div class="outline-text-4" id="text-7-2-2">

<ul>
<li><a href="http://stackoverflow.com/questions/1675992/how-do-i-set-a-background-color-for-the-whole-window-of-a-qt-application">Change the background color of the qt application</a>
</li>
</ul>


</div>
</div>

</div>

<div id="outline-container-7-3" class="outline-3">
<h3 id="sec-7-3">Basic Output to LCD Screen</h3>
<div class="outline-text-3" id="text-7-3">


</div>

<div id="outline-container-7-3-1" class="outline-4">
<h4 id="sec-7-3-1">MainWindow.cpp</h4>
<div class="outline-text-4" id="text-7-3-1">

<p>CANNOT INCLUDE FILE ../src/testing/qt/hello_qt/mainwindow.cpp
</p></div>

</div>

<div id="outline-container-7-3-2" class="outline-4">
<h4 id="sec-7-3-2">MainWindow.h</h4>
<div class="outline-text-4" id="text-7-3-2">

<p>CANNOT INCLUDE FILE ../src/testing/qt/hello_qt/mainwindow.h
</p></div>

</div>

<div id="outline-container-7-3-3" class="outline-4">
<h4 id="sec-7-3-3">moc_mainwindow.cpp</h4>
<div class="outline-text-4" id="text-7-3-3">

<p>CANNOT INCLUDE FILE ../src/testing/qt/hello_qt/moc_mainwindow.cpp
</p></div>

</div>

<div id="outline-container-7-3-4" class="outline-4">
<h4 id="sec-7-3-4">ui_mainwindow.h</h4>
<div class="outline-text-4" id="text-7-3-4">

<p>CANNOT INCLUDE FILE ../src/testing/qt/hello_qt/ui_mainwindow.h
</p></div>

</div>

<div id="outline-container-7-3-5" class="outline-4">
<h4 id="sec-7-3-5">mainwindow.ui</h4>
<div class="outline-text-4" id="text-7-3-5">

<p>CANNOT INCLUDE FILE ../src/testing/qt/hello_qt/mainwindow.ui
</p></div>
</div>

</div>

<div id="outline-container-7-4" class="outline-3">
<h3 id="sec-7-4">Hello World Program</h3>
<div class="outline-text-3" id="text-7-4">


</div>

<div id="outline-container-7-4-1" class="outline-4">
<h4 id="sec-7-4-1">Source Code</h4>
<div class="outline-text-4" id="text-7-4-1">




<pre class="src src-cpp"><span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @file hello_world.cpp</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Test basic functionality.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> *  @title Hello World</span>
<span style="color: #ff7f24; font-style: italic;"> *  @author Nicholas Guthrie</span>
<span style="color: #ff7f24; font-style: italic;"> *  @web http//nickguthrie.com</span>
<span style="color: #ff7f24; font-style: italic;"> *  @created June 11, 2013</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> *  Compile with: g++ -g -o ../../bin/testing/hello_world hello_world.cpp</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">------------------------------------------------------------------ :Libraries:</span>
<span style="color: #fa8072;">//                      </span><span style="color: #ff7f24; font-style: italic;">_    _ _                 _</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |  (_) |__ _ _ __ _ _ _(_)___ ___</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |__| | '_ \ '_/ _` | '_| / -_|_-&lt;</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">|____|_|_.__/_| \__,_|_| |_\___/__/</span>
<span style="color: #fa8072;">//</span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Input-Output</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;iostream&gt;</span>             <span style="color: #fa8072;">/* </span><span style="color: #ff7f24; font-style: italic;">input-output stream - necessary for cout */</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">#include &lt;fstream&gt;            /* to use file stream */</span>
<span style="color: #00ffff;">using</span> <span style="color: #00ffff;">namespace</span> <span style="color: #8470ff; font-weight: bold;">std</span>;            <span style="color: #fa8072;">/* </span><span style="color: #ff7f24; font-style: italic;">to not need std:: on all io */</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">Strings</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">#include &lt;string&gt;             /* to use strings */</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">#include &lt;sstream&gt;            /* use strings like cout */</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">#include &lt;cstdlib&gt;            /* for atoi */</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">#include &lt;cctype&gt;             /* for atoi */</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">#include &lt;vector&gt;</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">#include &lt;map&gt;</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">Math</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">#include &lt;math&gt;               /* pow, sqrt and use compile flag -lm */</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">#include &lt;algorithm&gt;          /* use sort and find */</span>

<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">--------------------------------------------------------------------- :Global:</span>
<span style="color: #fa8072;">//                            </span><span style="color: #ff7f24; font-style: italic;">___ _     _          _</span>
<span style="color: #fa8072;">//                           </span><span style="color: #ff7f24; font-style: italic;">/ __| |___| |__  __ _| |</span>
<span style="color: #fa8072;">//                          </span><span style="color: #ff7f24; font-style: italic;">| (_ | / _ \ '_ \/ _` | |</span>
<span style="color: #fa8072;">//                           </span><span style="color: #ff7f24; font-style: italic;">\___|_\___/_.__/\__,_|_|</span>
<span style="color: #fa8072;">//</span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">const int EMPTY = -1;</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">----------------------------------------------------------------- :Prototypes:</span>
<span style="color: #fa8072;">//                  </span><span style="color: #ff7f24; font-style: italic;">___         _       _</span>
<span style="color: #fa8072;">//                 </span><span style="color: #ff7f24; font-style: italic;">| _ \_ _ ___| |_ ___| |_ _  _ _ __  ___ ___</span>
<span style="color: #fa8072;">//                 </span><span style="color: #ff7f24; font-style: italic;">|  _/ '_/ _ \  _/ _ \  _| || | '_ \/ -_|_-&lt;</span>
<span style="color: #fa8072;">//                 </span><span style="color: #ff7f24; font-style: italic;">|_| |_| \___/\__\___/\__|\_, | .__/\___/__/</span>
<span style="color: #fa8072;">//                                          </span><span style="color: #ff7f24; font-style: italic;">|__/|_|</span>
<span style="color: #fa8072;">//</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #63b8ff;">int</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">Example_Function</span>();
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">----------------------------------------------------------------------- :Main:</span>
<span style="color: #fa8072;">//                              </span><span style="color: #ff7f24; font-style: italic;">__  __      _</span>
<span style="color: #fa8072;">//                             </span><span style="color: #ff7f24; font-style: italic;">|  \/  |__ _(_)_ _</span>
<span style="color: #fa8072;">//                             </span><span style="color: #ff7f24; font-style: italic;">| |\/| / _` | | ' \</span>
<span style="color: #fa8072;">//                             </span><span style="color: #ff7f24; font-style: italic;">|_|  |_\__,_|_|_||_|</span>
<span style="color: #fa8072;">//</span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #63b8ff;">int</span> main ( <span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">argc</span>, <span style="color: #63b8ff;">char</span>* <span style="color: #7fffd4;">argv</span>[] )
{
    <span style="color: #fa8072;">//////////////////////////////</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Variables</span>
    <span style="color: #fa8072;">//////////////////////////////</span>
    cout &lt;&lt; <span style="color: #ffc1c1;">"hello world"</span> &lt;&lt; endl;

    <span style="color: #fa8072;">//////////////////////////////</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Input</span>
    <span style="color: #fa8072;">//////////////////////////////</span>

    <span style="color: #fa8072;">//////////////////////////////</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Output</span>
    <span style="color: #fa8072;">//////////////////////////////</span>

    <span style="color: #fa8072;">//////////////////////////////</span>
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Exititing</span>
    <span style="color: #fa8072;">//////////////////////////////</span>
    <span style="color: #00ffff;">return</span> 0;
}
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">------------------------------------------------------------------ :Functions:</span>
<span style="color: #fa8072;">//                      </span><span style="color: #ff7f24; font-style: italic;">___             _   _</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| __|  _ _ _  __| |_(_)___ _ _  ___</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| _| || | ' \/ _|  _| / _ \ ' \(_-&lt;</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">|_| \_,_|_||_\__|\__|_\___/_||_/__/</span>
<span style="color: #fa8072;">//</span>
<span style="color: #fa8072;">//</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief</span>
<span style="color: #ff7f24; font-style: italic;"> *  @warning</span>
<span style="color: #ff7f24; font-style: italic;"> *  @param[in]</span>
<span style="color: #ff7f24; font-style: italic;"> *  @return</span>
<span style="color: #ff7f24; font-style: italic;"> */</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #63b8ff;">int</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">Example_Function</span>()
{
    <span style="color: #00ffff;">return</span> -1;
}
</pre>

</div>
</div>

</div>

<div id="outline-container-7-5" class="outline-3">
<h3 id="sec-7-5">Toggle A LED (A13-Olimex-Micro)</h3>
<div class="outline-text-3" id="text-7-5">


</div>

<div id="outline-container-7-5-1" class="outline-4">
<h4 id="sec-7-5-1">Using the Commandline</h4>
<div class="outline-text-4" id="text-7-5-1">

<ul>
<li id="sec-7-5-1-1">Turn it On<br/>



<pre class="src src-sh"><span style="color: #b0c4de;">echo</span> 1 &gt; /sys/devices/virtual/misc/sun4i-gpio/pin/pg9
</pre>

</li>
</ul>
<ul>
<li id="sec-7-5-1-2">Turn it Off<br/>



<pre class="src src-sh"><span style="color: #b0c4de;">echo</span> 0 &gt; /sys/devices/virtual/misc/sun4i-gpio/pin/pg9
</pre>

</li>
</ul>
</div>

</div>

<div id="outline-container-7-5-2" class="outline-4">
<h4 id="sec-7-5-2">Using C Code</h4>
<div class="outline-text-4" id="text-7-5-2">




<pre class="src src-c"><span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> *  @file gpio.c</span>
<span style="color: #ff7f24; font-style: italic;"> *  @brief Toggle pg9 LED gpio.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> *  Turns the Status LED on for two seconds, off for two seconds, then exits.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> *  @title gpio.c</span>
<span style="color: #ff7f24; font-style: italic;"> *  @author Nicholas Guthrie</span>
<span style="color: #ff7f24; font-style: italic;"> *  @created 2013-06-13</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> *  Compile with: gcc gpio.c -o ../../bin/testing/gpio</span>
<span style="color: #ff7f24; font-style: italic;"> </span><span style="color: #fa8072;">*/</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">/**</span>
<span style="color: #ff7f24; font-style: italic;"> * This program is free software: you can redistribute it and/or modify it under</span>
<span style="color: #ff7f24; font-style: italic;"> * the terms of the GNU General Public License as published by the Free Software</span>
<span style="color: #ff7f24; font-style: italic;"> * Foundation, either version 3 of the License, or (at your option) any later</span>
<span style="color: #ff7f24; font-style: italic;"> * version.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> * This program is distributed in the hope that it will be useful, but WITHOUT</span>
<span style="color: #ff7f24; font-style: italic;"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
<span style="color: #ff7f24; font-style: italic;"> * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more</span>
<span style="color: #ff7f24; font-style: italic;"> * details.</span>
<span style="color: #ff7f24; font-style: italic;"> *</span>
<span style="color: #ff7f24; font-style: italic;"> * You should have received a copy of the GNU General Public License along with</span>
<span style="color: #ff7f24; font-style: italic;"> * this program.  If not, see &lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.</span>
<span style="color: #ff7f24; font-style: italic;"> </span><span style="color: #fa8072;">*/</span>
<span style="color: #fa8072;">////////////////////////////////////////////////////////////////////////////////</span>
<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">------------------------------------------------------------------ :Libraries:</span>
<span style="color: #fa8072;">//                      </span><span style="color: #ff7f24; font-style: italic;">_    _ _                 _</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |  (_) |__ _ _ __ _ _ _(_)___ ___</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">| |__| | '_ \ '_/ _` | '_| / -_|_-&lt;</span>
<span style="color: #fa8072;">//                     </span><span style="color: #ff7f24; font-style: italic;">|____|_|_.__/_| \__,_|_| |_\___/__/</span>
<span style="color: #fa8072;">//</span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;stdio.h&gt;</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;fcntl.h&gt;</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;string.h&gt;</span>
<span style="color: #6495ed; font-style: italic;">#include</span> <span style="color: #ffc1c1;">&lt;unistd.h&gt;</span> <span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">for sleep</span>

<span style="color: #fa8072;">//</span><span style="color: #ff7f24; font-style: italic;">----------------------------------------------------------------------- :Main:</span>
<span style="color: #fa8072;">//                              </span><span style="color: #ff7f24; font-style: italic;">__  __      _</span>
<span style="color: #fa8072;">//                             </span><span style="color: #ff7f24; font-style: italic;">|  \/  |__ _(_)_ _</span>
<span style="color: #fa8072;">//                             </span><span style="color: #ff7f24; font-style: italic;">| |\/| / _` | | ' \</span>
<span style="color: #fa8072;">//                             </span><span style="color: #ff7f24; font-style: italic;">|_|  |_\__,_|_|_||_|</span>
<span style="color: #fa8072;">//</span>
<span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">-----------------------------------------------------------------------------</span>
<span style="color: #63b8ff;">int</span> <span style="color: #00fa9a; font-size: 110%; font-weight: bold;">main</span>()
{
    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Variables</span>
    <span style="color: #63b8ff;">char</span> <span style="color: #7fffd4;">s_0</span>[] = <span style="color: #ffc1c1;">"0"</span>;
    <span style="color: #63b8ff;">char</span> <span style="color: #7fffd4;">s_1</span>[] = <span style="color: #ffc1c1;">"1"</span>;
    <span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">fd</span>;
    <span style="color: #63b8ff;">int</span> <span style="color: #7fffd4;">num</span> = 0;

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Open GPIO Pin</span>
    <span style="color: #00ffff;">if</span>( (fd=open(<span style="color: #ffc1c1;">"/sys/devices/virtual/misc/sun4i-gpio/pin/pg9"</span>, O_RDWR)) &lt; 0 )
    {
        printf(<span style="color: #ffc1c1;">"ERROR Opening file, Exiting.\n"</span>);
        <span style="color: #00ffff;">return</span> 1;
    }
    <span style="color: #00ffff;">else</span>
    {
        printf(<span style="color: #ffc1c1;">"Sucessfully opened file.\n"</span>);
    }

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Turn LED On</span>
    <span style="color: #00ffff;">if</span>( write(fd, s_1, strlen(s_1)) &lt; 0 )
    {
        printf(<span style="color: #ffc1c1;">"  Error writing s_1, Exiting\n"</span>);
    }
    <span style="color: #00ffff;">else</span>
    {
        printf(<span style="color: #ffc1c1;">"  LED ON\n"</span>);
    }

    sleep(2);

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Turn LED Off</span>
    <span style="color: #00ffff;">if</span>( write(fd, s_0, strlen(s_0)) &lt; 0 )
    {
        printf(<span style="color: #ffc1c1;">"  Error writing s_0, Exiting\n"</span>);
    }
    <span style="color: #00ffff;">else</span>
    {
        printf(<span style="color: #ffc1c1;">"  LED OFF\n"</span>);
    }

    sleep(2);

    <span style="color: #fa8072;">// </span><span style="color: #ff7f24; font-style: italic;">Close file</span>
    <span style="color: #00ffff;">if</span>( close(fd)&lt;0 )
    {
        printf(<span style="color: #ffc1c1;">"ERROR closing file, Exiting.\n"</span>);
        <span style="color: #00ffff;">return</span> 1;
    }
    <span style="color: #00ffff;">else</span>
    {
        printf(<span style="color: #ffc1c1;">"Sucessfully closed file.\n"</span>);
    }
}
</pre>


</div>

</div>

<div id="outline-container-7-5-3" class="outline-4">
<h4 id="sec-7-5-3">Links</h4>
<div class="outline-text-4" id="text-7-5-3">

<ul>
<li><a href="http://olimex.wordpress.com/2012/10/23/a13-olinuxino-playing-with-gpios/">A13 Olinuxino Playing with GPIOS</a>
</li>
</ul>


</div>
</div>
</div>

</div>

<div id="outline-container-8" class="outline-2">
<h2 id="sec-8">GNU Free Documentation License</h2>
<div class="outline-text-2" id="text-8">




<pre class="src src-txt">                GNU Free Documentation License
                 Version 1.3, 3 November 2008

 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
     &lt;<a href="http://fsf.org/">http://fsf.org/</a>&gt;
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

0. PREAMBLE

The purpose of this License is to make a manual, textbook, or other
functional and useful document <span style="color: #ffc1c1;">"free"</span> in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.

This License is a kind of <span style="color: #ffc1c1;">"copyleft"</span>, which means that derivative
works of the document must themselves be free in the same sense.  It
complements the GNU General Public License, which is a copyleft
license designed for free software.

We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does.  But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book.  We recommend this License
principally for works whose purpose is instruction or reference.


1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License.  Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein.  The <span style="color: #ffc1c1;">"Document"</span>, below,
refers to any such manual or work.  Any member of the public is a
licensee, and is addressed as <span style="color: #ffc1c1;">"you"</span>.  You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.

A <span style="color: #ffc1c1;">"Modified Version"</span> of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.

A <span style="color: #ffc1c1;">"Secondary Section"</span> is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall
subject (or to related matters) and contains nothing that could fall
directly within that overall subject.  (Thus, if the Document is in
part a textbook of mathematics, a Secondary Section may not explain
any mathematics.)  The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.

The <span style="color: #ffc1c1;">"Invariant Sections"</span> are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.  If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant.  The Document may contain zero
Invariant Sections.  If the Document does not identify any Invariant
Sections then there are none.

The <span style="color: #ffc1c1;">"Cover Texts"</span> are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.  A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.

A <span style="color: #ffc1c1;">"Transparent"</span> copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters.  A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text.  A copy that is not <span style="color: #ffc1c1;">"Transparent"</span> is called <span style="color: #ffc1c1;">"Opaque"</span>.

Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML, PostScript or PDF designed for human modification.  Examples of
transparent image formats include PNG, XCF and JPG.  Opaque formats
include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.

The <span style="color: #ffc1c1;">"Title Page"</span> means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page.  For works in
formats which do not have any title page as such, <span style="color: #ffc1c1;">"Title Page"</span> means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.

The <span style="color: #ffc1c1;">"publisher"</span> means any person or entity that distributes copies of
the Document to the public.

A section <span style="color: #ffc1c1;">"Entitled XYZ"</span> means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language.  (Here XYZ stands for a
specific section name mentioned below, such as <span style="color: #ffc1c1;">"Acknowledgements"</span>,
<span style="color: #ffc1c1;">"Dedications"</span>, <span style="color: #ffc1c1;">"Endorsements"</span>, or <span style="color: #ffc1c1;">"History"</span>.)  To <span style="color: #ffc1c1;">"Preserve the Title"</span>
of such a section when you modify the Document means that it remains a
section <span style="color: #ffc1c1;">"Entitled XYZ"</span> according to this definition.

The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document.  These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.

2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no
other conditions whatsoever to those of this License.  You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute.  However, you may accept
compensation in exchange for copies.  If you distribute a large enough
number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and
you may publicly display copies.


3. COPYING IN QUANTITY

If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover.  Both covers must also clearly and legibly identify
you as the publisher of these copies.  The front cover must present
the full title with all words of the title equally prominent and
visible.  You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.

If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.

It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to
give them a chance to provide you with an updated version of the
Document.


4. MODIFICATIONS

You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it.  In addition, you must do these things in the Modified Version:

A. Use in the Title Page (and on the covers, if any) a title distinct
   from that of the Document, and from those of previous versions
   (which should, if there were any, be listed in the History section
   of the Document).  You may use the same title as a previous version
   if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
   responsible for authorship of the modifications in the Modified
   Version, together with at least five of the principal authors of the
   Document (all of its principal authors, if it has fewer than five),
   unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
   Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
   adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
   giving the public permission to use the Modified Version under the
   terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
   and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled <span style="color: #ffc1c1;">"History"</span>, Preserve its Title, and add
   to it an item stating at least the title, year, new authors, and
   publisher of the Modified Version as given on the Title Page.  If
   there is no section Entitled <span style="color: #ffc1c1;">"History"</span> in the Document, create one
   stating the title, year, authors, and publisher of the Document as
   given on its Title Page, then add an item describing the Modified
   Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
   public access to a Transparent copy of the Document, and likewise
   the network locations given in the Document for previous versions
   it was based on.  These may be placed in the <span style="color: #ffc1c1;">"History"</span> section.
   You may omit a network location for a work that was published at
   least four years before the Document itself, or if the original
   publisher of the version it refers to gives permission.
K. For any section Entitled <span style="color: #ffc1c1;">"Acknowledgements"</span> or <span style="color: #ffc1c1;">"Dedications"</span>,
   Preserve the Title of the section, and preserve in the section all
   the substance and tone of each of the contributor acknowledgements
   and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
   unaltered in their text and in their titles.  Section numbers
   or the equivalent are not considered part of the section titles.
M. Delete any section Entitled <span style="color: #ffc1c1;">"Endorsements"</span>.  Such a section
   may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled <span style="color: #ffc1c1;">"Endorsements"</span>
   or to conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.

If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant.  To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.

You may add a section Entitled <span style="color: #ffc1c1;">"Endorsements"</span>, provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.

You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version.  Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity.  If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.


5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.

The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy.  If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections Entitled <span style="color: #ffc1c1;">"History"</span>
in the various original documents, forming one section Entitled
<span style="color: #ffc1c1;">"History"</span>; likewise combine any sections Entitled <span style="color: #ffc1c1;">"Acknowledgements"</span>,
and any sections Entitled <span style="color: #ffc1c1;">"Dedications"</span>.  You must delete all sections
Entitled <span style="color: #ffc1c1;">"Endorsements"</span>.


6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other
documents released under this License, and replace the individual
copies of this License in the various documents with a single copy
that is included in the collection, provided that you follow the rules
of this License for verbatim copying of each of the documents in all
other respects.

You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert a
copy of this License into the extracted document, and follow this
License in all other respects regarding verbatim copying of that
document.


7. AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an <span style="color: #ffc1c1;">"aggregate"</span> if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.


8. TRANSLATION

Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections.  You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers.  In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.

If a section in the Document is Entitled <span style="color: #ffc1c1;">"Acknowledgements"</span>,
<span style="color: #ffc1c1;">"Dedications"</span>, or <span style="color: #ffc1c1;">"History"</span>, the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.


9. TERMINATION

You may not copy, modify, sublicense, or distribute the Document
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense, or distribute it is void, and
will automatically terminate your rights under this License.

However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.

Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, receipt of a copy of some or all of the same material does
not give you any rights to use it.


10. FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions of the
GNU Free Documentation License from time to time.  Such new versions
will be similar in spirit to the present version, but may differ in
detail to address new problems or concerns.  See
http://www.gnu.org/copyleft/.

Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License <span style="color: #ffc1c1;">"or any later version"</span> applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation.  If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.  If the Document
specifies that a proxy can decide which future versions of this
License can be used, that proxy's public statement of acceptance of a
version permanently authorizes you to choose that version for the
Document.

11. RELICENSING

<span style="color: #ffc1c1;">"Massive Multiauthor Collaboration Site"</span> (or <span style="color: #ffc1c1;">"MMC Site"</span>) means any
World Wide Web server that publishes copyrightable works and also
provides prominent facilities for anybody to edit those works.  A
public wiki that anybody can edit is an example of such a server.  A
<span style="color: #ffc1c1;">"Massive Multiauthor Collaboration"</span> (or <span style="color: #ffc1c1;">"MMC"</span>) contained in the site
means any set of copyrightable works thus published on the MMC site.

<span style="color: #ffc1c1;">"CC-BY-SA"</span> means the Creative Commons Attribution-Share Alike 3.0
license published by Creative Commons Corporation, a not-for-profit
corporation with a principal place of business in San Francisco,
California, as well as future copyleft versions of that license
published by that same organization.

<span style="color: #ffc1c1;">"Incorporate"</span> means to publish or republish a Document, in whole or in
part, as part of another Document.

An MMC is <span style="color: #ffc1c1;">"eligible for relicensing"</span> if it is licensed under this
License, and if all works that were first published under this License
somewhere other than this MMC, and subsequently incorporated in whole or
in part into the MMC, (1) had no cover texts or invariant sections, and
(2) were thus incorporated prior to November 1, 2008.

The operator of an MMC Site may republish an MMC contained in the site
under CC-BY-SA on the same site at any time before August 1, 2009,
provided the MMC is eligible for relicensing.


ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:

    Copyright (c)  YEAR  YOUR NAME.
    Permission is granted to copy, distribute and/or modify this document
    under the terms of the GNU Free Documentation License, Version 1.3
    or any later version published by the Free Software Foundation;
    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
    A copy of the license is included in the section entitled <span style="color: #ffc1c1;">"GNU</span>
<span style="color: #ffc1c1;">    Free Documentation License"</span>.

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the <span style="color: #ffc1c1;">"with...Texts."</span> line with this:

    with the Invariant Sections being LIST THEIR TITLES, with the
    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.

If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.

If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
</pre>




</div>
</div>
</div>

<div id="postamble">
<p class="date">Date: 2013-06-04 Tue</p>
<p class="creator"><a href="http://orgmode.org">Org</a> version 7.9.2 with <a href="http://www.gnu.org/software/emacs/">Emacs</a> version 23</p>
<a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a>

</div>
</body>
</html>
